]> granicus.if.org Git - python/commitdiff
One-off "No handlers..." error message only raised if raiseExceptions is set.
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Sun, 23 Oct 2005 22:32:59 +0000 (22:32 +0000)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Sun, 23 Oct 2005 22:32:59 +0000 (22:32 +0000)
Lib/logging/__init__.py

index b06935e8e6f8d35926fc161bb06909309676eb8f..ac734e541e049b47a1c9c0c782047b813378a770 100644 (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