mirror of https://github.com/python/cpython
Remove dependency on order of mode flags
This commit is contained in:
parent
46d9623875
commit
2ca7c190b6
|
@ -193,7 +193,7 @@ class ZipFile:
|
|||
self.NameToInfo = {} # Find file info given name
|
||||
self.filelist = [] # List of ZipInfo instances for archive
|
||||
self.compression = compression # Method of compression
|
||||
self.mode = key = mode[0].replace('b', '')
|
||||
self.mode = key = mode.replace('b', '')[0]
|
||||
|
||||
# Check if we were passed a file-like object
|
||||
if isinstance(file, basestring):
|
||||
|
|
Loading…
Reference in New Issue