diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2005-10-31 14:27:01 +0000 |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2005-10-31 14:27:01 +0000 |
commit | 0a3fb85ad70b5f2623d1df64a63b2cc9e59b95b3 (patch) | |
tree | 3b838f7745ab5b7026bb3e840a51ba6ab6b82c99 /Lib/logging | |
parent | 7d03d243965ace9bc563de4e9235a7d3cf548820 (diff) | |
download | cpython-0a3fb85ad70b5f2623d1df64a63b2cc9e59b95b3.tar.gz |
Exception handling now raises KeyboardInterrupt and SystemExit rather than passing to handleError
Diffstat (limited to 'Lib/logging')
-rw-r--r-- | Lib/logging/handlers.py | 6 |
1 files changed, 6 insertions, 0 deletions
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) |