Remove unused code

This commit is contained in:
Kovid Goyal 2020-10-16 19:38:17 +05:30
parent 72b3993fca
commit 612079b5bf
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -748,7 +748,6 @@ def __init__(self, file, mode="r", compression=ZIP_DEFLATED, allowZip64=True):
self.debug = 0 # Level of printing: 0 through 3
self.NameToInfo = {} # Find file info given name
self.filelist = [] # List of ZipInfo instances for archive
self.extract_mapping = {}
self.compression = compression # Method of compression
self.mode = key = mode.replace('b', '')[0]
self.pwd = None
@ -1160,7 +1159,6 @@ def _extract_member(self, member, targetpath, pwd):
except Exception: # Added by Kovid
targetpath = os.path.join(base_target, sanitize_file_name(fname))
os.mkdir(targetpath)
self.extract_mapping[member.filename] = targetpath
return targetpath
if not os.path.exists(targetpath):
@ -1184,7 +1182,6 @@ def _extract_member(self, member, targetpath, pwd):
os.utime(targetpath, (mtime, mtime))
except:
pass
self.extract_mapping[member.filename] = targetpath
return targetpath
def _writecheck(self, zinfo):