]> granicus.if.org Git - python/commitdiff
Fix tarfile depending on buggy int('1\0', base) behavior.
authorGeorg Brandl <georg@python.org>
Thu, 12 Oct 2006 12:03:07 +0000 (12:03 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 12 Oct 2006 12:03:07 +0000 (12:03 +0000)
Lib/tarfile.py

index 38cccae1d5ee06fd708cea681ff4c8d2092d5501..8d5f021c39a05a6258e0dd3e3490c13be00aeb5d 100644 (file)
@@ -144,7 +144,7 @@ def nti(s):
     # 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):