diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2014-09-11 22:06:09 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2014-09-11 22:06:09 (GMT) |
commit | d1d4fbff6335cc638201a5d011b1c93d9d306b6b (patch) | |
tree | e828a882c4b1b662a553afdb858782bfc4b60a95 /Lib/logging | |
parent | 42d67af87fc2b1d297cce1cd8d762461e009f0a0 (diff) | |
download | cpython-d1d4fbff6335cc638201a5d011b1c93d9d306b6b.zip cpython-d1d4fbff6335cc638201a5d011b1c93d9d306b6b.tar.gz cpython-d1d4fbff6335cc638201a5d011b1c93d9d306b6b.tar.bz2 |
Issue #22386: fixed regression.
Diffstat (limited to 'Lib/logging')
-rw-r--r-- | Lib/logging/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index a61c2b0..7fb3a35 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -129,7 +129,8 @@ def getLevelName(level): Otherwise, the string "Level %s" % level is returned. """ - return _levelToName.get(level, ("Level %s" % level)) + # See Issue #22386 for the reason for this convoluted expression + return _levelToName.get(level, _nameToLevel.get(level, ("Level %s" % level))) def addLevelName(level, levelName): """ |