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:
Mark Dickinson 2010-05-04 18:45:27 +00:00
parent 06a7e2069a
commit 3b0b4ff19e
1 changed files with 1 additions and 1 deletions

View File

@ -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.