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