six: changed offlineimap/folder/Gmail.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
75c718c75b
commit
bafcef77fd
@ -19,8 +19,6 @@
|
||||
|
||||
import re
|
||||
from sys import exc_info
|
||||
import six
|
||||
|
||||
from offlineimap import imaputil, imaplibutil, OfflineImapError
|
||||
import offlineimap.accounts
|
||||
from .IMAP import IMAPFolder
|
||||
@ -134,13 +132,12 @@ class GmailFolder(IMAPFolder):
|
||||
res_type, response = imapobj.fetch("'%s'" % msgsToFetch,
|
||||
'(FLAGS X-GM-LABELS UID)')
|
||||
if res_type != 'OK':
|
||||
six.reraise(OfflineImapError,
|
||||
OfflineImapError(
|
||||
raise OfflineImapError(
|
||||
"FETCHING UIDs in folder [%s]%s failed. " %
|
||||
(self.getrepository(), self) +
|
||||
"Server responded '[%s] %s'" %
|
||||
(res_type, response),
|
||||
OfflineImapError.ERROR.FOLDER),
|
||||
OfflineImapError.ERROR.FOLDER,
|
||||
exc_info()[2])
|
||||
finally:
|
||||
self.imapserver.releaseconnection(imapobj)
|
||||
|
Loading…
Reference in New Issue
Block a user