diff options
| author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2014-09-11 23:08:48 +0100 |
|---|---|---|
| committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2014-09-11 23:08:48 +0100 |
| commit | a56411e5d4c91027c65780c8bdc81dd943cd9c87 (patch) | |
| tree | 857772ad8ad05b6c02af990831bfe8b7d581fc9f /Lib/logging | |
| parent | ee6c3c7162dee452dc42d9a1001bf1a0a1e15f26 (diff) | |
| parent | d1d4fbff6335cc638201a5d011b1c93d9d306b6b (diff) | |
| download | cpython-git-a56411e5d4c91027c65780c8bdc81dd943cd9c87.tar.gz | |
Closes #22386: merged fix from 3.4.
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 a61c2b07c9..7fb3a352e5 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): """ |
