[Python-checkins] commit of r41361 - python/branches/release24-maint/Lib/logging
vinay.sajip@python.org
vinay.sajip at python.org
Mon Oct 31 15:30:37 CET 2005
Author: vinay.sajip
Date: Mon Oct 31 15:30:37 2005
New Revision: 41361
Modified:
python/branches/release24-maint/Lib/logging/handlers.py
Log:
Exception handling now raises KeyboardInterrupt and SystemExit rather than passing to handleError
Modified: python/branches/release24-maint/Lib/logging/handlers.py
==============================================================================
--- python/branches/release24-maint/Lib/logging/handlers.py (original)
+++ python/branches/release24-maint/Lib/logging/handlers.py Mon Oct 31 15:30:37 2005
@@ -71,6 +71,8 @@
if self.shouldRollover(record):
self.doRollover()
logging.FileHandler.emit(self, record)
+ except (KeyboardInterrupt, SystemExit):
+ raise
except:
self.handleError(record)
@@ -418,6 +420,8 @@
try:
s = self.makePickle(record)
self.send(s)
+ except (KeyboardInterrupt, SystemExit):
+ raise
except:
self.handleError(record)
@@ -639,6 +643,8 @@
self.socket.send(msg)
else:
self.socket.sendto(msg, self.address)
+ except (KeyboardInterrupt, SystemExit):
+ raise
except:
self.handleError(record)
@@ -719,6 +725,8 @@
formatdate(), msg)
smtp.sendmail(self.fromaddr, self.toaddrs, msg)
smtp.quit()
+ except (KeyboardInterrupt, SystemExit):
+ raise
except:
self.handleError(record)
@@ -804,6 +812,8 @@
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)
@@ -879,6 +889,8 @@
if self.method == "POST":
h.send(data)
h.getreply() #can't do anything with the result
+ except (KeyboardInterrupt, SystemExit):
+ raise
except:
self.handleError(record)
More information about the Python-checkins
mailing list