Commit 85c1909a authored by Vinay Sajip's avatar Vinay Sajip

Exception handling now raises KeyboardInterrupt and SystemExit rather than passing to handleError

parent ab0f947a
......@@ -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)
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment