File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # Copyright 2001-2015 by Vinay Sajip. All Rights Reserved.
1+ # Copyright 2001-2016 by Vinay Sajip. All Rights Reserved.
22#
33# Permission to use, copy, modify, and distribute this software and its
44# documentation for any purpose and without fee is hereby granted,
1818Logging package for Python. Based on PEP 282 and comments thereto in
1919comp.lang.python.
2020
21- Copyright (C) 2001-2015 Vinay Sajip. All Rights Reserved.
21+ Copyright (C) 2001-2016 Vinay Sajip. All Rights Reserved.
2222
2323To use, simply 'import logging' and log away!
2424"""
@@ -129,8 +129,9 @@ def getLevelName(level):
129129
130130 Otherwise, the string "Level %s" % level is returned.
131131 """
132- # See Issue #22386 for the reason for this convoluted expression
133- return _levelToName .get (level , _nameToLevel .get (level , ("Level %s" % level )))
132+ # See Issues #22386 and #27937 for why it's this way
133+ return (_levelToName .get (level ) or _nameToLevel .get (level ) or
134+ "Level %s" % level )
134135
135136def addLevelName (level , levelName ):
136137 """
You can’t perform that action at this time.
0 commit comments