From 8a92dd5866061211d80ee4f61ae091aa4e0fdb5d Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Sat, 6 Nov 2004 00:31:51 +0000 Subject: Don't choke on modes like rb or wb. --- Lib/zipfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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): -- cgit v0.12