Remove some dead code from gzip and tarfile (#138123)
The original_n variable and the writebuf and bufsize attributes were never used.
This commit is contained in:
@@ -268,8 +268,6 @@ class GzipFile(_streams.BaseStream):
|
|||||||
self.name = filename
|
self.name = filename
|
||||||
self.crc = zlib.crc32(b"")
|
self.crc = zlib.crc32(b"")
|
||||||
self.size = 0
|
self.size = 0
|
||||||
self.writebuf = []
|
|
||||||
self.bufsize = 0
|
|
||||||
self.offset = 0 # Current file offset for seek(), tell(), etc
|
self.offset = 0 # Current file offset for seek(), tell(), etc
|
||||||
|
|
||||||
def tell(self):
|
def tell(self):
|
||||||
|
|||||||
@@ -201,7 +201,6 @@ def itn(n, digits=8, format=DEFAULT_FORMAT):
|
|||||||
# base-256 representation. This allows values up to (256**(digits-1))-1.
|
# base-256 representation. This allows values up to (256**(digits-1))-1.
|
||||||
# A 0o200 byte indicates a positive number, a 0o377 byte a negative
|
# A 0o200 byte indicates a positive number, a 0o377 byte a negative
|
||||||
# number.
|
# number.
|
||||||
original_n = n
|
|
||||||
n = int(n)
|
n = int(n)
|
||||||
if 0 <= n < 8 ** (digits - 1):
|
if 0 <= n < 8 ** (digits - 1):
|
||||||
s = bytes("%0*o" % (digits - 1, n), "ascii") + NUL
|
s = bytes("%0*o" % (digits - 1, n), "ascii") + NUL
|
||||||
|
|||||||
Reference in New Issue
Block a user