mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Issue #6314: logging.basicConfig() performs extra checks on the "level" argument.
This commit is contained in:
parent
2a998fabec
commit
0f6eac2ad2
2 changed files with 8 additions and 1 deletions
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue