summaryrefslogtreecommitdiff
path: root/Lib/tarfile.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-08-21 18:43:51 +0000
committerNeal Norwitz <nnorwitz@gmail.com>2006-08-21 18:43:51 +0000
commit7443b80549ad7d74c22d94e953ebe89137037f08 (patch)
tree1f25768bfba27f472cc602f869146b272d96e68d /Lib/tarfile.py
parentdb232dc86a9a9992b7f0e9bdbc27426cc04ccf52 (diff)
downloadcpython-git-7443b80549ad7d74c22d94e953ebe89137037f08.tar.gz
Backport 51432:
Fix bug #1543303, tarfile adds padding that breaks gunzip. Patch # 1543897. (remove the padding)
Diffstat (limited to 'Lib/tarfile.py')
-rw-r--r--Lib/tarfile.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
index c185fbd49e..38cccae1d5 100644
--- a/Lib/tarfile.py
+++ b/Lib/tarfile.py
@@ -411,9 +411,6 @@ class _Stream:
self.buf += self.cmp.flush()
if self.mode == "w" and self.buf:
- blocks, remainder = divmod(len(self.buf), self.bufsize)
- if remainder > 0:
- self.buf += NUL * (self.bufsize - remainder)
self.fileobj.write(self.buf)
self.buf = ""
if self.comptype == "gz":