commit | 8a92dd5866061211d80ee4f61ae091aa4e0fdb5d | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Sat Nov 06 00:31:51 2004 +0000 |
committer | Raymond Hettinger <python@rcn.com> | Sat Nov 06 00:31:51 2004 +0000 |
tree | 902baba6bbdd300d5165f922234a4ae140b3ce7f | |
parent | 93d9d5fb37cca015444e4579d260eac8eacad96f [diff] [blame] |
Don't choke on modes like rb or wb.
diff --git a/Lib/zipfile.py b/Lib/zipfile.py index 31e6f83..958ee9e 100644 --- a/Lib/zipfile.py +++ b/Lib/zipfile.py
@@ -193,7 +193,7 @@ 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):