[Python-checkins] r52313 - python/trunk/Lib/tarfile.py

georg.brandl python-checkins at python.org
Thu Oct 12 14:03:08 CEST 2006


Author: georg.brandl
Date: Thu Oct 12 14:03:07 2006
New Revision: 52313

Modified:
   python/trunk/Lib/tarfile.py
Log:
Fix tarfile depending on buggy int('1\0', base) behavior.


Modified: python/trunk/Lib/tarfile.py
==============================================================================
--- python/trunk/Lib/tarfile.py	(original)
+++ python/trunk/Lib/tarfile.py	Thu Oct 12 14:03:07 2006
@@ -144,7 +144,7 @@
     # There are two possible encodings for a number field, see
     # itn() below.
     if s[0] != chr(0200):
-        n = int(s.rstrip(NUL) or "0", 8)
+        n = int(s.rstrip(NUL + " ") or "0", 8)
     else:
         n = 0L
         for i in xrange(len(s) - 1):


More information about the Python-checkins mailing list