mirror of
https://github.com/python/cpython.git
synced 2025-07-29 22:24:49 +00:00
Fix tarfile depending on buggy int('1\0', base) behavior.
This commit is contained in:
parent
a9969a6460
commit
35207712dc
1 changed files with 1 additions and 1 deletions
|
@ -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):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue