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:
Rodolfo García Peñas (kix) 2020-09-03 20:38:05 +02:00
parent bafcef77fd
commit 4b32d62fe9

View File

@ -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,10 +179,9 @@ class GmailMaildirFolder(MaildirFolder):
try:
os.rename(tmppath, filepath)
except OSError as e:
six.reraise(OfflineImapError,
OfflineImapError("Can't rename file '%s' to '%s': %s" %
raise OfflineImapError("Can't rename file '%s' to '%s': %s" %
(tmppath, filepath, e[1]),
OfflineImapError.ERROR.FOLDER),
OfflineImapError.ERROR.FOLDER,
exc_info()[2])
# If utime_from_header=true, we don't want to change the mtime.