commit of r41358 - python/trunk/Lib/logging

Author: vinay.sajip Date: Mon Oct 31 14:14:19 2005 New Revision: 41358 Modified: python/trunk/Lib/logging/__init__.py python/trunk/Lib/logging/handlers.py Log: Exception handling now raises KeyboardInterrupt and SystemExit rather than passing to handleError Modified: python/trunk/Lib/logging/__init__.py ============================================================================== --- python/trunk/Lib/logging/__init__.py (original) +++ python/trunk/Lib/logging/__init__.py Mon Oct 31 14:14:19 2005 @@ -738,6 +738,8 @@ except UnicodeError: self.stream.write(fs % msg.encode("UTF-8")) self.flush() + except (KeyboardInterrupt, SystemExit): + raise except: self.handleError(record) Modified: python/trunk/Lib/logging/handlers.py ============================================================================== --- python/trunk/Lib/logging/handlers.py (original) +++ python/trunk/Lib/logging/handlers.py Mon Oct 31 14:14:19 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)
participants (1)
-
vinay.sajip@python.org