mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Fixes #12637: Merged fix from 3.2 and added test.
This commit is contained in:
commit
8188f585b2
2 changed files with 4 additions and 1 deletions
|
@ -1442,7 +1442,8 @@ class Logger(Filterer):
|
|||
c = c.parent
|
||||
if (found == 0):
|
||||
if lastResort:
|
||||
lastResort.handle(record)
|
||||
if record.levelno >= lastResort.level:
|
||||
lastResort.handle(record)
|
||||
elif raiseExceptions and not self.manager.emittedNoHandlerWarning:
|
||||
sys.stderr.write("No handlers could be found for logger"
|
||||
" \"%s\"\n" % self.name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue