Kaydet (Commit) 58bf57fa authored tarafından Georg Brandl's avatar Georg Brandl

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

 (backport from rev. 52313)
üst ef11b1ab
...@@ -144,7 +144,7 @@ def nti(s): ...@@ -144,7 +144,7 @@ def nti(s):
# There are two possible encodings for a number field, see # There are two possible encodings for a number field, see
# itn() below. # itn() below.
if s[0] != chr(0200): if s[0] != chr(0200):
n = int(s.rstrip(NUL) or "0", 8) n = int(s.rstrip(NUL + " ") or "0", 8)
else: else:
n = 0L n = 0L
for i in xrange(len(s) - 1): for i in xrange(len(s) - 1):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment