]> granicus.if.org Git - python/commitdiff
Exception handling now raises KeyboardInterrupt and SystemExit rather than passing...
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Mon, 31 Oct 2005 14:27:01 +0000 (14:27 +0000)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Mon, 31 Oct 2005 14:27:01 +0000 (14:27 +0000)
Lib/logging/handlers.py

index e0ab788f323707897c98455768efd1cb5ba05ae2..0ffbc4744aabf556e5393475fc6127617931bebe 100644 (file)
@@ -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)