mirror of https://github.com/python/cpython
Fix test_gzip failure on OS X. The failure was a result of trying to fflush
a file that wasn't open for writing. Patch by Antoine Pitrou.
This commit is contained in:
parent
06a7e2069a
commit
3b0b4ff19e
|
@ -362,7 +362,7 @@ class GzipFile(io.BufferedIOBase):
|
|||
if self.mode == WRITE:
|
||||
# Ensure the compressor's buffer is flushed
|
||||
self.fileobj.write(self.compress.flush(zlib_mode))
|
||||
self.fileobj.flush()
|
||||
self.fileobj.flush()
|
||||
|
||||
def fileno(self):
|
||||
"""Invoke the underlying file object's fileno() method.
|
||||
|
|
Loading…
Reference in New Issue