You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
zipfile.py -> is_zipfile leaves file open when error #48491
Very simple error.
If is_zipfile crashes when checking is_zipfile if zipfile is corrupted
or not at all zip. It leaves file open and prevents later to remove file
etc... Maybe it's corrected in next versions
Old code: zipfile...
line 86: endrec = _EndRecData(fpin)
line 87: fpin.close
My simple corrections to cope with this
try:
endrec = _EndRecData(fpin)
finally:
fpin.close()
Activity
eino commentedon Oct 30, 2008
Very simple error.
If is_zipfile crashes when checking is_zipfile if zipfile is corrupted
or not at all zip. It leaves file open and prevents later to remove file
etc... Maybe it's corrected in next versions
Old code: zipfile...
line 86: endrec = _EndRecData(fpin)
line 87: fpin.close
My simple corrections to cope with this
try:
endrec = _EndRecData(fpin)
finally:
fpin.close()
ggenellina commentedon Dec 27, 2008
The patch for bpo-4756 fixes this too.
pitrou commentedon Dec 27, 2008
Fixed by Gabriel's patch (just committed in trunk and py3k).