Commit 8a92dd58 authored by Raymond Hettinger's avatar Raymond Hettinger

Don't choke on modes like rb or wb.

parent 93d9d5fb
......@@ -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]
self.mode = key = mode[0].replace('b', '')
# Check if we were passed a file-like object
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