Commit 4e2823bc authored by Philip Thiem's avatar Philip Thiem

Seems to be an issue with using ZipFile as a context on python 3.1

--HG--
branch : distribute
extra : rebase_source : d81c62a1c2efbeefc848979e07b16506213c0949
parent 0c10ea7a
......@@ -1371,11 +1371,15 @@ def build_zipmanifest(path):
* [7] - zipinfo.CRC
"""
zipinfo = dict()
with zipfile.ZipFile(path) as zfile:
zfile = zipfile.ZipFile(path)
#Got ZipFile has not __exit__ on python 3.1
try:
for zitem in zfile.namelist():
zpath = zitem.replace('/', os.sep)
zipinfo[zpath] = zfile.getinfo(zitem)
assert zipinfo[zpath] is not None
finally:
zfile.close()
return zipinfo
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment