File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1396,6 +1396,10 @@ def basicConfig(**kwargs):
13961396 root .addHandler (hdlr )
13971397 level = kwargs .get ("level" )
13981398 if level is not None :
1399+ if str (level ) == level : # If a string was passed, do more checks
1400+ if level not in _levelNames :
1401+ raise ValueError ("Unknown level: %r" % level )
1402+ level = _levelNames [level ]
13991403 root .setLevel (level )
14001404
14011405#---------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -15,12 +15,15 @@ Core and Builtins
1515Library
1616-------
1717
18+ - Issue #6314: logging.basicConfig() performs extra checks on the "level"
19+ argument.
20+
1821- Issue #6274: Fixed possible file descriptors leak in subprocess.py
1922
2023- Accessing io.StringIO.buffer now raises an AttributeError instead of
2124 io.UnsupportedOperation.
2225
23- - Issue #6271: mmap tried to close invalid file handle (-1) when annonymous .
26+ - Issue #6271: mmap tried to close invalid file handle (-1) when anonymous .
2427 (On Unix)
2528
2629
You can’t perform that action at this time.
0 commit comments