Remove dependency on order of mode flags

This commit is contained in:
Raymond Hettinger 2005-02-16 09:27:49 +00:00
parent 46d9623875
commit 2ca7c190b6
1 changed files with 1 additions and 1 deletions

View File

@ -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):