diff options
author | Guido van Rossum <guido@python.org> | 2001-04-14 16:45:14 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-04-14 16:45:14 (GMT) |
commit | f85af612f8c109f52333ee2d106b0848bf6ab372 (patch) | |
tree | fa96e9216d757879841b2fdc7d624f2caf916ffe /Lib/zipfile.py | |
parent | 3024bb6e25c25b16c38db7af028f08f796b0cd3a (diff) | |
download | cpython-f85af612f8c109f52333ee2d106b0848bf6ab372.zip cpython-f85af612f8c109f52333ee2d106b0848bf6ab372.tar.gz cpython-f85af612f8c109f52333ee2d106b0848bf6ab372.tar.bz2 |
Mark Favas points out that there's an 'self.fp.flush()' call in the
ZipFile.close() method that should be part of the preceding 'if'
block. On some platforms (Mark noticed this on FreeBSD 4.2) doing a
flush() on a file open for reading is not allowed.
Diffstat (limited to 'Lib/zipfile.py')
-rw-r--r-- | Lib/zipfile.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py index 6a7641f..74095e2 100644 --- a/Lib/zipfile.py +++ b/Lib/zipfile.py @@ -468,7 +468,7 @@ class ZipFile: endrec = struct.pack(structEndArchive, stringEndArchive, 0, 0, count, count, pos2 - pos1, pos1, 0) self.fp.write(endrec) - self.fp.flush() + self.fp.flush() if not self._filePassed: self.fp.close() self.fp = None |