mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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.
This commit is contained in:
parent
3024bb6e25
commit
f85af612f8
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue