summaryrefslogtreecommitdiffstats
path: root/Lib/zipfile.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-11-06 00:31:51 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-11-06 00:31:51 (GMT)
commit8a92dd5866061211d80ee4f61ae091aa4e0fdb5d (patch)
tree902baba6bbdd300d5165f922234a4ae140b3ce7f /Lib/zipfile.py
parent93d9d5fb37cca015444e4579d260eac8eacad96f (diff)
downloadcpython-8a92dd5866061211d80ee4f61ae091aa4e0fdb5d.zip
cpython-8a92dd5866061211d80ee4f61ae091aa4e0fdb5d.tar.gz
cpython-8a92dd5866061211d80ee4f61ae091aa4e0fdb5d.tar.bz2
Don't choke on modes like rb or wb.
Diffstat (limited to 'Lib/zipfile.py')
-rw-r--r--Lib/zipfile.py2
1 files changed, 1 insertions, 1 deletions
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 @@ 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):