mirror of
https://github.com/python/cpython.git
synced 2025-12-07 17:57:56 +00:00
Don't choke on modes like rb or wb.
This commit is contained in:
parent
93d9d5fb37
commit
8a92dd5866
1 changed files with 1 additions and 1 deletions
|
|
@ -193,7 +193,7 @@ class ZipFile:
|
||||||
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.compression = compression # Method of compression
|
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
|
# Check if we were passed a file-like object
|
||||||
if isinstance(file, basestring):
|
if isinstance(file, basestring):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue