From: Mark Dickinson Date: Tue, 4 May 2010 18:45:27 +0000 (+0000) Subject: Fix test_gzip failure on OS X. The failure was a result of trying to fflush X-Git-Tag: v2.7b2~88 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3b0b4ff19e4d1d84ca7029a48cad27d64d9af7ab;p=python 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. --- diff --git a/Lib/gzip.py b/Lib/gzip.py index 13f2ca24b7..5fc7639f56 100644 --- a/Lib/gzip.py +++ b/Lib/gzip.py @@ -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.