Fix SF tracker bug #403871: AttributeError in ZipFile.__del__() when

there was an IOError opening the underlying file in ZipFile.__init__().
This commit is contained in:
Fred Drake 2001-02-28 05:29:34 +00:00
parent 3f571d6497
commit 90eac285c8
1 changed files with 2 additions and 0 deletions

View File

@ -92,6 +92,8 @@ class ZipInfo:
class ZipFile:
"""Class with methods to open, read, write, close, list zip files."""
fp = None # Set here since __del__ checks it
def __init__(self, filename, mode="r", compression=ZIP_STORED):
"""Open the ZIP file with mode read "r", write "w" or append "a"."""
if compression == ZIP_STORED: