From ae32602750e415754ca2ef964c9b26738f6c3029 Mon Sep 17 00:00:00 2001 From: "vinay.sajip" Date: Mon, 31 Oct 2005 14:27:01 +0000 Subject: [PATCH] Exception handling now raises KeyboardInterrupt and SystemExit rather than passing to handleError git-svn-id: http://svn.python.org/projects/python/trunk@41360 6015fed2-1504-0410-9fe1-9d1591cc4771 --- Lib/logging/handlers.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py index e0ab788f32..0ffbc4744a 100644 --- a/Lib/logging/handlers.py +++ b/Lib/logging/handlers.py @@ -725,6 +725,8 @@ class SMTPHandler(logging.Handler): formatdate(), msg) smtp.sendmail(self.fromaddr, self.toaddrs, msg) smtp.quit() + except (KeyboardInterrupt, SystemExit): + raise except: self.handleError(record) @@ -810,6 +812,8 @@ class NTEventLogHandler(logging.Handler): type = self.getEventType(record) msg = self.format(record) self._welu.ReportEvent(self.appname, id, cat, type, [msg]) + except (KeyboardInterrupt, SystemExit): + raise except: self.handleError(record) @@ -885,6 +889,8 @@ class HTTPHandler(logging.Handler): if self.method == "POST": h.send(data) h.getreply() #can't do anything with the result + except (KeyboardInterrupt, SystemExit): + raise except: self.handleError(record) -- 2.11.4.GIT