summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2005-10-31 13:14:19 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2005-10-31 13:14:19 (GMT)
commit85c1909a78c97745cd41a56be7bce372b7d60d64 (patch)
treeed86e7113e4a4c9dc897bdb9b87cd7a39ad9e34d
parentab0f947a21008b57121cc40b01dcbb3d79f1f65a (diff)
downloadcpython-85c1909a78c97745cd41a56be7bce372b7d60d64.zip
cpython-85c1909a78c97745cd41a56be7bce372b7d60d64.tar.gz
cpython-85c1909a78c97745cd41a56be7bce372b7d60d64.tar.bz2
Exception handling now raises KeyboardInterrupt and SystemExit rather than passing to handleError
-rw-r--r--Lib/logging/__init__.py2
-rw-r--r--Lib/logging/handlers.py6
2 files changed, 8 insertions, 0 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
index ac734e5..5a0b0f5 100644
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -738,6 +738,8 @@ class StreamHandler(Handler):
except UnicodeError:
self.stream.write(fs % msg.encode("UTF-8"))
self.flush()
+ except (KeyboardInterrupt, SystemExit):
+ raise
except:
self.handleError(record)
diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py
index 0182dfe..e0ab788 100644
--- a/Lib/logging/handlers.py
+++ b/Lib/logging/handlers.py
@@ -71,6 +71,8 @@ class BaseRotatingHandler(logging.FileHandler):
if self.shouldRollover(record):
self.doRollover()
logging.FileHandler.emit(self, record)
+ except (KeyboardInterrupt, SystemExit):
+ raise
except:
self.handleError(record)
@@ -418,6 +420,8 @@ class SocketHandler(logging.Handler):
try:
s = self.makePickle(record)
self.send(s)
+ except (KeyboardInterrupt, SystemExit):
+ raise
except:
self.handleError(record)
@@ -639,6 +643,8 @@ class SysLogHandler(logging.Handler):
self.socket.send(msg)
else:
self.socket.sendto(msg, self.address)
+ except (KeyboardInterrupt, SystemExit):
+ raise
except:
self.handleError(record)