Index: gzip.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/gzip.py,v retrieving revision 1.42 diff -c -r1.42 gzip.py *** gzip.py 27 Jul 2004 21:05:21 -0000 1.42 --- gzip.py 26 Jan 2005 21:53:27 -0000 *************** *** 331,337 **** return self.close() ! def flush(self): self.fileobj.flush() def fileno(self): --- 331,340 ---- return self.close() ! def flush(self,zlib_mode=zlib.Z_SYNC_FLUSH): ! if self.mode == WRITE: ! # Ensure the compressor's buffer is flushed ! self.fileobj.write(self.compress.flush(zlib_mode)) self.fileobj.flush() def fileno(self):