mirror of
https://github.com/python/cpython.git
synced 2026-03-27 15:10:56 +00:00
ZipFile.close(): Killed one of the struct.pack deprecation
warnings on Win32.
Also added an XXX about the line:
pos3 = self.fp.tell()
`pos3` is never referenced, and I have no idea what the code
intended to do instead.
This commit is contained in:
parent
10183b8e40
commit
352bf0d7ee
1 changed files with 2 additions and 1 deletions
|
|
@ -708,9 +708,10 @@ def close(self):
|
|||
stringEndArchive64Locator, 0, pos2, 1)
|
||||
self.fp.write(zip64locrec)
|
||||
|
||||
# XXX Why is `pos3` computed next? It's never referenced.
|
||||
pos3 = self.fp.tell()
|
||||
endrec = struct.pack(structEndArchive, stringEndArchive,
|
||||
0, 0, count, count, pos2 - pos1, 0xffffffff, 0) # -1, 0)
|
||||
0, 0, count, count, pos2 - pos1, -1, 0)
|
||||
self.fp.write(endrec)
|
||||
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue