mirror of
https://github.com/python/cpython
synced 2024-10-09 03:28:16 +00:00
Don't choke on modes like rb or wb.
This commit is contained in:
parent
93d9d5fb37
commit
8a92dd5866
|
@ -193,7 +193,7 @@ def __init__(self, file, mode="r", compression=ZIP_STORED):
|
|||
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]
|
||||
self.mode = key = mode[0].replace('b', '')
|
||||
|
||||
# Check if we were passed a file-like object
|
||||
if isinstance(file, basestring):
|
||||
|
|
Loading…
Reference in a new issue