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
|
import os
|
||||||
from sys import exc_info
|
from sys import exc_info
|
||||||
import six
|
|
||||||
|
|
||||||
import offlineimap.accounts
|
import offlineimap.accounts
|
||||||
from offlineimap import OfflineImapError
|
from offlineimap import OfflineImapError
|
||||||
from offlineimap import imaputil
|
from offlineimap import imaputil
|
||||||
@ -181,10 +179,9 @@ class GmailMaildirFolder(MaildirFolder):
|
|||||||
try:
|
try:
|
||||||
os.rename(tmppath, filepath)
|
os.rename(tmppath, filepath)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
six.reraise(OfflineImapError,
|
raise OfflineImapError("Can't rename file '%s' to '%s': %s" %
|
||||||
OfflineImapError("Can't rename file '%s' to '%s': %s" %
|
|
||||||
(tmppath, filepath, e[1]),
|
(tmppath, filepath, e[1]),
|
||||||
OfflineImapError.ERROR.FOLDER),
|
OfflineImapError.ERROR.FOLDER,
|
||||||
exc_info()[2])
|
exc_info()[2])
|
||||||
|
|
||||||
# If utime_from_header=true, we don't want to change the mtime.
|
# If utime_from_header=true, we don't want to change the mtime.
|
||||||
|
Loading…
Reference in New Issue
Block a user