six: changed offlineimap/folder/GmailMaildir.py
This patch removes the library six, compatible with python2. I need change this re-raise call. Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
This commit is contained in:
parent
bafcef77fd
commit
4b32d62fe9
@ -18,8 +18,6 @@
|
||||
|
||||
import os
|
||||
from sys import exc_info
|
||||
import six
|
||||
|
||||
import offlineimap.accounts
|
||||
from offlineimap import OfflineImapError
|
||||
from offlineimap import imaputil
|
||||
@ -181,11 +179,10 @@ class GmailMaildirFolder(MaildirFolder):
|
||||
try:
|
||||
os.rename(tmppath, filepath)
|
||||
except OSError as e:
|
||||
six.reraise(OfflineImapError,
|
||||
OfflineImapError("Can't rename file '%s' to '%s': %s" %
|
||||
(tmppath, filepath, e[1]),
|
||||
OfflineImapError.ERROR.FOLDER),
|
||||
exc_info()[2])
|
||||
raise OfflineImapError("Can't rename file '%s' to '%s': %s" %
|
||||
(tmppath, filepath, e[1]),
|
||||
OfflineImapError.ERROR.FOLDER,
|
||||
exc_info()[2])
|
||||
|
||||
# If utime_from_header=true, we don't want to change the mtime.
|
||||
if self._utime_from_header and mtime:
|
||||
|
Loading…
Reference in New Issue
Block a user