commit | 35207712dcfef23dea29d83e4d3d15fcab38b55e | [log] [tgz] |
---|---|---|
author | Georg Brandl <georg@python.org> | Thu Oct 12 12:03:07 2006 +0000 |
committer | Georg Brandl <georg@python.org> | Thu Oct 12 12:03:07 2006 +0000 |
tree | a21dfbf03d5d99d1ea1c073bff56364a5d951e58 | |
parent | a9969a64606bc426d95a1302e8710988d5849767 [diff] [blame] |
Fix tarfile depending on buggy int('1\0', base) behavior.
diff --git a/Lib/tarfile.py b/Lib/tarfile.py index 38cccae..8d5f021 100644 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py
@@ -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):