summaryrefslogtreecommitdiffstats
path: root/Lib/gzip.py
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2014-03-09 21:44:34 (GMT)
committerNed Deily <nad@acm.org>2014-03-09 21:44:34 (GMT)
commit6120739f0cb1c26069570fea701fe79489f1cd9d (patch)
tree30e5a50c465b7ea804d697cf7bec8a9d84658b76 /Lib/gzip.py
parent5e572fd490c625193e043ee6e8a9e54900e008b1 (diff)
downloadcpython-6120739f0cb1c26069570fea701fe79489f1cd9d.zip
cpython-6120739f0cb1c26069570fea701fe79489f1cd9d.tar.gz
cpython-6120739f0cb1c26069570fea701fe79489f1cd9d.tar.bz2
Issue #20875: Prevent possible gzip "'read' is not defined" NameError.
Patch by Claudiu Popa.
Diffstat (limited to 'Lib/gzip.py')
-rw-r--r--Lib/gzip.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/gzip.py b/Lib/gzip.py
index 2fd03fa..4ff9820 100644
--- a/Lib/gzip.py
+++ b/Lib/gzip.py
@@ -99,7 +99,7 @@ class _PaddedFile:
self._read -= len(prepend)
return
else:
- self._buffer = self._buffer[read:] + prepend
+ self._buffer = self._buffer[self._read:] + prepend
self._length = len(self._buffer)
self._read = 0