From: Georg Brandl Date: Thu, 12 Oct 2006 12:03:11 +0000 (+0000) Subject: Fix tarfile depending on buggy int('1\0', base) behavior. X-Git-Tag: v2.5.1c1~322 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=58bf57fa040741496cd4c53c85e3269a3e11af1b;p=python Fix tarfile depending on buggy int('1\0', base) behavior. (backport from rev. 52313) --- diff --git a/Lib/tarfile.py b/Lib/tarfile.py index 38cccae1d5..8d5f021c39 100644 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py @@ -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):