From: Vinay Sajip Date: Sun, 23 Oct 2005 22:36:53 +0000 (+0000) Subject: One-off "No handlers..." error message only raised if raiseExceptions is set. X-Git-Tag: v2.4.3c1~232 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5dee43bddc5306ddb708af659689413716d89a99;p=thirdparty%2FPython%2Fcpython.git One-off "No handlers..." error message only raised if raiseExceptions is set. --- diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index b06935e8e6f8..ac734e541e04 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