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