[Python-checkins] commit of r41360 - python/trunk/Lib/logging

vinay.sajip@python.org vinay.sajip at python.org
Mon Oct 31 15:27:02 CET 2005


Author: vinay.sajip
Date: Mon Oct 31 15:27:01 2005
New Revision: 41360

Modified:
   python/trunk/Lib/logging/handlers.py
Log:
Exception handling now raises KeyboardInterrupt and SystemExit rather than passing to handleError

Modified: python/trunk/Lib/logging/handlers.py
==============================================================================
--- python/trunk/Lib/logging/handlers.py	(original)
+++ python/trunk/Lib/logging/handlers.py	Mon Oct 31 15:27:01 2005
@@ -725,6 +725,8 @@
                             formatdate(), msg)
             smtp.sendmail(self.fromaddr, self.toaddrs, msg)
             smtp.quit()
+        except (KeyboardInterrupt, SystemExit):
+            raise
         except:
             self.handleError(record)
 
@@ -810,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)
 
@@ -885,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