]> granicus.if.org Git - python/commitdiff
Merged revisions 80764 via svnmerge from
authorMark Dickinson <dickinsm@gmail.com>
Tue, 4 May 2010 18:47:50 +0000 (18:47 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Tue, 4 May 2010 18:47:50 +0000 (18:47 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r80764 | mark.dickinson | 2010-05-04 19:47:04 +0100 (Tue, 04 May 2010) | 10 lines

  Merged revisions 80762 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r80762 | mark.dickinson | 2010-05-04 19:45:27 +0100 (Tue, 04 May 2010) | 3 lines

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

Lib/gzip.py

index 0fa4ddfdb849d2c84b69e9c77ee1f2eda2e5c4c8..6a9fbc2c1addb26c4cf7ad2c3d8c92d83835ff9a 100644 (file)
@@ -363,7 +363,7 @@ class GzipFile:
         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.