[pypy-svn] r61275 - pypy/trunk/lib-python/modified-2.5.2

fijal at codespeak.net fijal at codespeak.net
Fri Jan 23 17:59:26 CET 2009


Author: fijal
Date: Fri Jan 23 17:59:25 2009
New Revision: 61275

Added:
   pypy/trunk/lib-python/modified-2.5.2/gzip.py
      - copied, changed from r61272, pypy/trunk/lib-python/2.5.2/gzip.py
Log:
actually at least flush file when called close(). Apparently we cannot
really close file here as tarfile depends on it not being closed


Copied: pypy/trunk/lib-python/modified-2.5.2/gzip.py (from r61272, pypy/trunk/lib-python/2.5.2/gzip.py)
==============================================================================
--- pypy/trunk/lib-python/2.5.2/gzip.py	(original)
+++ pypy/trunk/lib-python/modified-2.5.2/gzip.py	Fri Jan 23 17:59:25 2009
@@ -324,8 +324,10 @@
             write32u(self.fileobj, LOWU32(self.crc))
             # self.size may exceed 2GB, or even 4GB
             write32u(self.fileobj, LOWU32(self.size))
+            self.fileobj.flush()
             self.fileobj = None
         elif self.mode == READ:
+            self.fileobj.flush()
             self.fileobj = None
         if self.myfileobj:
             self.myfileobj.close()



More information about the Pypy-commit mailing list