six: changed offlineimap/imaplibutil.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
cefac73af4
commit
edf22e0e96
@ -24,9 +24,7 @@ import errno
|
|||||||
import zlib
|
import zlib
|
||||||
from sys import exc_info
|
from sys import exc_info
|
||||||
from hashlib import sha512, sha384, sha256, sha224, sha1
|
from hashlib import sha512, sha384, sha256, sha224, sha1
|
||||||
import six
|
|
||||||
import rfc6555
|
import rfc6555
|
||||||
|
|
||||||
from offlineimap import OfflineImapError
|
from offlineimap import OfflineImapError
|
||||||
from offlineimap.ui import getglobalui
|
from offlineimap.ui import getglobalui
|
||||||
from imaplib2 import IMAP4, IMAP4_SSL, InternalDate
|
from imaplib2 import IMAP4, IMAP4_SSL, InternalDate
|
||||||
@ -59,9 +57,8 @@ class UsefulIMAPMixIn:
|
|||||||
errstr = "Server '%s' closed connection, error on SELECT '%s'. Ser" \
|
errstr = "Server '%s' closed connection, error on SELECT '%s'. Ser" \
|
||||||
"ver said: %s" % (self.host, mailbox, e.args[0])
|
"ver said: %s" % (self.host, mailbox, e.args[0])
|
||||||
severity = OfflineImapError.ERROR.FOLDER_RETRY
|
severity = OfflineImapError.ERROR.FOLDER_RETRY
|
||||||
six.reraise(OfflineImapError,
|
raise OfflineImapError(errstr, severity, exc_info()[2])
|
||||||
OfflineImapError(errstr, severity),
|
|
||||||
exc_info()[2])
|
|
||||||
if result[0] != 'OK':
|
if result[0] != 'OK':
|
||||||
# in case of error, bail out with OfflineImapError
|
# in case of error, bail out with OfflineImapError
|
||||||
errstr = "Error SELECTing mailbox '%s', server reply:\n%s" % \
|
errstr = "Error SELECTing mailbox '%s', server reply:\n%s" % \
|
||||||
|
Loading…
Reference in New Issue
Block a user