Skip to content

Commit edf6e68

Browse files
authored
Remove some dead code from gzip and tarfile (#138123)
The original_n variable and the writebuf and bufsize attributes were never used.
1 parent a553065 commit edf6e68

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

Lib/gzip.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,6 @@ def _init_write(self, filename):
268268
self.name = filename
269269
self.crc = zlib.crc32(b"")
270270
self.size = 0
271-
self.writebuf = []
272-
self.bufsize = 0
273271
self.offset = 0 # Current file offset for seek(), tell(), etc
274272

275273
def tell(self):

Lib/tarfile.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ def itn(n, digits=8, format=DEFAULT_FORMAT):
201201
# base-256 representation. This allows values up to (256**(digits-1))-1.
202202
# A 0o200 byte indicates a positive number, a 0o377 byte a negative
203203
# number.
204-
original_n = n
205204
n = int(n)
206205
if 0 <= n < 8 ** (digits - 1):
207206
s = bytes("%0*o" % (digits - 1, n), "ascii") + NUL

0 commit comments

Comments
 (0)