From 1e86beb3f81d153481ed5cdfacbc8730b5e8c2a2 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Sun, 23 Oct 2005 22:32:59 +0000 Subject: One-off "No handlers..." error message only raised if raiseExceptions is set. --- Lib/logging/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index b06935e..ac734e5 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -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 -- cgit v0.12