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 13f2ca2..5fc7639 100644
--- a/Lib/gzip.py
+++ b/Lib/gzip.py
@@ -362,7 +362,7 @@
         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.