This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author snejsource
Recipients
Date 2001-03-29.15:40:36
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
During the construction of a ZipFile object, a 
file is opened and assigned to self.fp.

If anything goes wrong, i.e. the file is not a zipfile,
it is not closed explicitly.  

On Windows, this does not work:

import zipfile, os

filename="test.zip" # it's a broken one
try:
  zf=zipfile.ZipFile(filename)
  zf.close()
finally:
  os.unlink(zipfile)

=> OSError: [errno 13] Permission denied "test.zip"

(on Unix, the file stays open too, but unlink doesn't
fail)
History
Date User Action Args
2007-08-23 13:53:45adminlinkissue412214 messages
2007-08-23 13:53:45admincreate