Merge pull request #579 from skgsergio/fix_log_python3.4

Fix AttributeError exception in log.py with python3.4
This commit is contained in:
Valentin Lorentz 2014-04-01 20:29:25 +02:00
commit 33262e125f

View File

@ -209,7 +209,10 @@ class ValidLogLevel(registry.String):
def set(self, s):
s = s.upper()
try:
level = logging._levelNames[s]
try:
level = logging._levelNames[s]
except AttributeError:
level = logging._nameToLevel[s]
except KeyError:
try:
level = int(s)