[Python-checkins] python/dist/src/Lib gzip.py,1.42,1.43
loewis at users.sourceforge.net
loewis at users.sourceforge.net
Thu Mar 3 09:35:24 CET 2005
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3086/Lib
Modified Files:
gzip.py
Log Message:
Patch #1110248: SYNC_FLUSH the zlib buffer for GZipFile.flush.
Partially fixes #1110242.
Index: gzip.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/gzip.py,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- gzip.py 27 Jul 2004 21:05:21 -0000 1.42
+++ gzip.py 3 Mar 2005 08:35:21 -0000 1.43
@@ -331,7 +331,10 @@
return
self.close()
- def flush(self):
+ 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):
More information about the Python-checkins
mailing list