One-off "No handlers..." error message only raised if raiseExceptions is set.

This commit is contained in:
Vinay Sajip 2005-10-23 22:32:59 +00:00
parent db85ed548a
commit 1e86beb3f8
1 changed files with 1 additions and 1 deletions

View File

@ -1123,7 +1123,7 @@ class Logger(Filterer):
c = None #break out
else:
c = c.parent
if (found == 0) and not self.manager.emittedNoHandlerWarning:
if (found == 0) and raiseExceptions and not self.manager.emittedNoHandlerWarning:
sys.stderr.write("No handlers could be found for logger"
" \"%s\"\n" % self.name)
self.manager.emittedNoHandlerWarning = 1