Commit 57b13b00 authored by Vinay Sajip's avatar Vinay Sajip

Issue #6314: logging.basicConfig() performs extra checks on the "level" argument.

parent 47f93fd5
......@@ -1396,6 +1396,10 @@ def basicConfig(**kwargs):
root.addHandler(hdlr)
level = kwargs.get("level")
if level is not None:
if str(level) == level: # If a string was passed, do more checks
if level not in _levelNames:
raise ValueError("Unknown level: %r" % level)
level = _levelNames[level]
root.setLevel(level)
#---------------------------------------------------------------------------
......
......@@ -15,12 +15,15 @@ Core and Builtins
Library
-------
- Issue #6314: logging.basicConfig() performs extra checks on the "level"
argument.
- Issue #6274: Fixed possible file descriptors leak in subprocess.py
- Accessing io.StringIO.buffer now raises an AttributeError instead of
io.UnsupportedOperation.
- Issue #6271: mmap tried to close invalid file handle (-1) when annonymous.
- Issue #6271: mmap tried to close invalid file handle (-1) when anonymous.
(On Unix)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment