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