Kaydet (Commit) 8a92dd58 authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Don't choke on modes like rb or wb.

üst 93d9d5fb
...@@ -193,7 +193,7 @@ class ZipFile: ...@@ -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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment