Fix tarfile depending on buggy int('1\0', base) behavior.

(backport from rev. 52313)
This commit is contained in:
Georg Brandl 2006-10-12 12:03:11 +00:00
parent ef11b1ab9c
commit 58bf57fa04
1 changed files with 1 additions and 1 deletions

View 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):