Skip to content

Commit 962e598

Browse files
authored
Merge branch 'main' into add-mtime-to-gzip-open
2 parents 33d07f4 + 28eac9a commit 962e598

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/gzip.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,10 +611,10 @@ def read(self, size=-1):
611611
# Read a chunk of data from the file
612612
if self._decompressor.needs_input:
613613
buf = self._fp.read(READ_BUFFER_SIZE)
614-
uncompress = self._decompressor.decompress(buf, size)
615614
else:
616-
uncompress = self._decompressor.decompress(b"", size)
615+
buf = b""
617616

617+
uncompress = self._decompressor.decompress(buf, size)
618618
if self._decompressor.unused_data != b"":
619619
# Prepend the already read bytes to the fileobj so they can
620620
# be seen by _read_eof() and _read_gzip_header()

0 commit comments

Comments
 (0)