lists.arthurdejong.org
RSS feed

python-stdnum commit: r16 - python-stdnum/stdnum/isbn

[Date Prev][Date Next] [Thread Prev][Thread Next]

python-stdnum commit: r16 - python-stdnum/stdnum/isbn



Author: arthur
Date: Tue Jul 27 22:14:19 2010
New Revision: 16
URL: http://arthurdejong.org/viewvc/python-stdnum?view=rev&revision=16

Log:
fix range detection to handle lookup errors more gracefully

Modified:
   python-stdnum/stdnum/isbn/ranges.py

Modified: python-stdnum/stdnum/isbn/ranges.py
==============================================================================
--- python-stdnum/stdnum/isbn/ranges.py Tue Jul 27 22:13:25 2010        (r15)
+++ python-stdnum/stdnum/isbn/ranges.py Tue Jul 27 22:14:19 2010        (r16)
@@ -296,7 +296,7 @@
                 return number[:length], number[length:]
     except KeyError:
         pass
-    return ( number, )
+    return ( '', number )
 
 def load(fp):
     """Loads the data from the specified file descriptor. The provided file
--
To unsubscribe send an email to
python-stdnum-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/python-stdnum-commits