mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Exception handling now raises KeyboardInterrupt and SystemExit rather than passing to handleError
This commit is contained in:
parent
85c1909a78
commit
245a5ab31b
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue