six: changed offlineimap/accounts.py
This patch removes the library six, compatible with python2. I need change these re-raise calls. Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
This commit is contained in:
parent
df4b9174d7
commit
b8137a8028
@ -20,7 +20,6 @@ import os
|
||||
import time
|
||||
from sys import exc_info
|
||||
import traceback
|
||||
import six
|
||||
|
||||
from offlineimap import mbnames, CustomConfig, OfflineImapError
|
||||
from offlineimap import globals
|
||||
@ -245,11 +244,10 @@ class SyncableAccount(Account):
|
||||
pass # fnctl not available, disable file locking... :(
|
||||
except IOError:
|
||||
self._lockfd.close()
|
||||
six.reraise(OfflineImapError,
|
||||
OfflineImapError(
|
||||
raise OfflineImapError(
|
||||
"Could not lock account %s. Is another "
|
||||
"instance using this account?" % self,
|
||||
OfflineImapError.ERROR.REPO),
|
||||
OfflineImapError.ERROR.REPO,
|
||||
exc_info()[2])
|
||||
|
||||
def _unlock(self):
|
||||
@ -614,11 +612,10 @@ def syncfolder(account, remotefolder, quick):
|
||||
localstart = localfolder.getstartdate()
|
||||
remotestart = remotefolder.getstartdate()
|
||||
if (maxage is not None) + (localstart is not None) + (remotestart is not None) > 1:
|
||||
six.reraise(OfflineImapError,
|
||||
OfflineImapError("You can set at most one of the "
|
||||
raise OfflineImapError("You can set at most one of the "
|
||||
"following: maxage, startdate (for the local "
|
||||
"folder), startdate (for the remote folder)",
|
||||
OfflineImapError.ERROR.REPO),
|
||||
OfflineImapError.ERROR.REPO,
|
||||
exc_info()[2])
|
||||
if (maxage is not None or localstart or remotestart) and quick:
|
||||
# IMAP quickchanged isn't compatible with options that
|
||||
|
Loading…
Reference in New Issue
Block a user