six: changed offlineimap/CustomConfig.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
b8137a8028
commit
493aefc09d
@ -18,7 +18,6 @@ import os
|
|||||||
import re
|
import re
|
||||||
from sys import exc_info
|
from sys import exc_info
|
||||||
from configparser import SafeConfigParser, Error
|
from configparser import SafeConfigParser, Error
|
||||||
import six
|
|
||||||
from offlineimap.localeval import LocalEval
|
from offlineimap.localeval import LocalEval
|
||||||
|
|
||||||
|
|
||||||
@ -71,10 +70,8 @@ class CustomConfigParser(SafeConfigParser):
|
|||||||
val = self.get(section, option).strip()
|
val = self.get(section, option).strip()
|
||||||
return re.split(separator_re, val)
|
return re.split(separator_re, val)
|
||||||
except re.error as e:
|
except re.error as e:
|
||||||
six.reraise(Error,
|
raise Error("Bad split regexp '%s': %s" %
|
||||||
Error("Bad split regexp '%s': %s" %
|
(separator_re, e), exc_info()[2])
|
||||||
(separator_re, e)),
|
|
||||||
exc_info()[2])
|
|
||||||
|
|
||||||
def getdefaultlist(self, section, option, default, separator_re):
|
def getdefaultlist(self, section, option, default, separator_re):
|
||||||
"""Same as getlist, but returns the value of `default`
|
"""Same as getlist, but returns the value of `default`
|
||||||
|
Loading…
Reference in New Issue
Block a user