Issue #6314: logging.basicConfig() performs extra checks on the "level" argument.
This commit is contained in:
parent
2a998fabec
commit
0f6eac2ad2
@ -1396,6 +1396,10 @@ def basicConfig(**kwargs):
|
|||||||
root.addHandler(hdlr)
|
root.addHandler(hdlr)
|
||||||
level = kwargs.get("level")
|
level = kwargs.get("level")
|
||||||
if level is not None:
|
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)
|
root.setLevel(level)
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
@ -15,12 +15,15 @@ Core and Builtins
|
|||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #6314: logging.basicConfig() performs extra checks on the "level"
|
||||||
|
argument.
|
||||||
|
|
||||||
- Issue #6274: Fixed possible file descriptors leak in subprocess.py
|
- Issue #6274: Fixed possible file descriptors leak in subprocess.py
|
||||||
|
|
||||||
- Accessing io.StringIO.buffer now raises an AttributeError instead of
|
- Accessing io.StringIO.buffer now raises an AttributeError instead of
|
||||||
io.UnsupportedOperation.
|
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)
|
(On Unix)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user