New submission from Eino Mäkitalo <[EMAIL PROTECTED]>:

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()

----------
components: Library (Lib)
messages: 75368
nosy: eino
severity: normal
status: open
title: zipfile.py -> is_zipfile leaves file open when error
type: crash
versions: Python 2.5

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4241>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to