six: changed offlineimap/repository/__init__.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
6321a66287
commit
35b588f57e
@ -15,7 +15,6 @@
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
from sys import exc_info
|
||||
import six
|
||||
|
||||
try:
|
||||
from configparser import NoSectionError
|
||||
@ -68,8 +67,7 @@ class Repository:
|
||||
except NoSectionError:
|
||||
errstr = ("Could not find section '%s' in configuration. Required "
|
||||
"for account '%s'." % ('Repository %s' % name, account))
|
||||
six.reraise(OfflineImapError,
|
||||
OfflineImapError(errstr, OfflineImapError.ERROR.REPO),
|
||||
raise OfflineImapError(errstr, OfflineImapError.ERROR.REPO,
|
||||
exc_info()[2])
|
||||
|
||||
try:
|
||||
@ -77,8 +75,7 @@ class Repository:
|
||||
except KeyError:
|
||||
errstr = "'%s' repository not supported for '%s' repositories." % \
|
||||
(repostype, reqtype)
|
||||
six.reraise(OfflineImapError,
|
||||
OfflineImapError(errstr, OfflineImapError.ERROR.REPO),
|
||||
raise OfflineImapError(errstr, OfflineImapError.ERROR.REPO,
|
||||
exc_info()[2])
|
||||
|
||||
return repo(name, account)
|
||||
|
Loading…
Reference in New Issue
Block a user