Commit 0a3fb85a authored by Vinay Sajip's avatar Vinay Sajip

Exception handling now raises KeyboardInterrupt and SystemExit rather than passing to handleError

parent 7d03d243
...@@ -725,6 +725,8 @@ class SMTPHandler(logging.Handler): ...@@ -725,6 +725,8 @@ class SMTPHandler(logging.Handler):
formatdate(), msg) formatdate(), msg)
smtp.sendmail(self.fromaddr, self.toaddrs, msg) smtp.sendmail(self.fromaddr, self.toaddrs, msg)
smtp.quit() smtp.quit()
except (KeyboardInterrupt, SystemExit):
raise
except: except:
self.handleError(record) self.handleError(record)
...@@ -810,6 +812,8 @@ class NTEventLogHandler(logging.Handler): ...@@ -810,6 +812,8 @@ class NTEventLogHandler(logging.Handler):
type = self.getEventType(record) type = self.getEventType(record)
msg = self.format(record) msg = self.format(record)
self._welu.ReportEvent(self.appname, id, cat, type, [msg]) self._welu.ReportEvent(self.appname, id, cat, type, [msg])
except (KeyboardInterrupt, SystemExit):
raise
except: except:
self.handleError(record) self.handleError(record)
...@@ -885,6 +889,8 @@ class HTTPHandler(logging.Handler): ...@@ -885,6 +889,8 @@ class HTTPHandler(logging.Handler):
if self.method == "POST": if self.method == "POST":
h.send(data) h.send(data)
h.getreply() #can't do anything with the result h.getreply() #can't do anything with the result
except (KeyboardInterrupt, SystemExit):
raise
except: except:
self.handleError(record) self.handleError(record)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment