From: Raymond Hettinger Date: Wed, 16 Feb 2005 09:30:17 +0000 (+0000) Subject: Remove dependency on order of mode flags X-Git-Tag: v2.4.1c1~46 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=62f48abab3aac26a60486b737535f513cb3e08bf;p=thirdparty%2FPython%2Fcpython.git Remove dependency on order of mode flags --- diff --git a/Lib/zipfile.py b/Lib/zipfile.py index 958ee9e95a12..93436cf8b350 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].replace('b', '') + self.mode = key = mode.replace('b', '')[0] # Check if we were passed a file-like object if isinstance(file, basestring):