mirror of https://github.com/python/cpython
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:
parent
3f571d6497
commit
90eac285c8
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue