OSError does not include __getitem__
This patch removes the issue about using [] with OSError instances. This es an old method from Python2. This patch is related to issue #37, issue 4.
This commit is contained in:
parent
33f3b4b1aa
commit
c305f47e84
@ -183,7 +183,7 @@ class GmailMaildirFolder(MaildirFolder):
|
||||
os.rename(tmppath, filepath)
|
||||
except OSError as e:
|
||||
raise OfflineImapError("Can't rename file '%s' to '%s': %s" %
|
||||
(tmppath, filepath, e[1]),
|
||||
(tmppath, filepath, e.errno),
|
||||
OfflineImapError.ERROR.FOLDER,
|
||||
exc_info()[2])
|
||||
|
||||
|
@ -470,7 +470,7 @@ class MaildirFolder(BaseFolder):
|
||||
except OSError as e:
|
||||
raise OfflineImapError(
|
||||
"Can't rename file '%s' to '%s': %s" %
|
||||
(oldfilename, newfilename, e[1]),
|
||||
(oldfilename, newfilename, e.errno),
|
||||
OfflineImapError.ERROR.FOLDER,
|
||||
exc_info()[2])
|
||||
|
||||
@ -556,7 +556,7 @@ class MaildirFolder(BaseFolder):
|
||||
except OSError as e:
|
||||
raise OfflineImapError(
|
||||
"Can't rename file '%s' to '%s': %s" %
|
||||
(filename, newfilename, e[1]),
|
||||
(filename, newfilename, e.errno),
|
||||
OfflineImapError.ERROR.FOLDER,
|
||||
exc_info()[2])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user