mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Fix AttributeError exception in log.py with python3.4
This commit is contained in:
parent
0f3a159a60
commit
ad3deb7c21
@ -208,8 +208,11 @@ class ValidLogLevel(registry.String):
|
|||||||
minimumLevel = -1
|
minimumLevel = -1
|
||||||
def set(self, s):
|
def set(self, s):
|
||||||
s = s.upper()
|
s = s.upper()
|
||||||
|
try:
|
||||||
try:
|
try:
|
||||||
level = logging._levelNames[s]
|
level = logging._levelNames[s]
|
||||||
|
except AttributeError:
|
||||||
|
level = logging._nameToLevel[s]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
try:
|
try:
|
||||||
level = int(s)
|
level = int(s)
|
||||||
|
Loading…
Reference in New Issue
Block a user