diff -r 58c90cf81293 Lib/logging/__init__.py --- a/Lib/logging/__init__.py Fri Oct 05 14:10:57 2012 +0300 +++ b/Lib/logging/__init__.py Fri Oct 05 20:21:10 2012 +0300 @@ -938,9 +938,7 @@ stream.write(msg) stream.write(self.terminator) self.flush() - except (KeyboardInterrupt, SystemExit): #pragma: no cover - raise - except: + except Exception: self.handleError(record) class FileHandler(StreamHandler): diff -r 58c90cf81293 Lib/logging/config.py --- a/Lib/logging/config.py Fri Oct 05 14:10:57 2012 +0300 +++ b/Lib/logging/config.py Fri Oct 05 20:21:10 2012 +0300 @@ -833,9 +833,7 @@ file = io.StringIO(chunk) try: fileConfig(file) - except (KeyboardInterrupt, SystemExit): #pragma: no cover - raise - except: + except Exception: traceback.print_exc() if self.server.ready: self.server.ready.set() diff -r 58c90cf81293 Lib/logging/handlers.py --- a/Lib/logging/handlers.py Fri Oct 05 14:10:57 2012 +0300 +++ b/Lib/logging/handlers.py Fri Oct 05 20:21:10 2012 +0300 @@ -72,9 +72,7 @@ if self.shouldRollover(record): self.doRollover() logging.FileHandler.emit(self, record) - except (KeyboardInterrupt, SystemExit): #pragma: no cover - raise - except: + except Exception: self.handleError(record) def rotation_filename(self, default_name): @@ -609,9 +607,7 @@ try: s = self.makePickle(record) self.send(s) - except (KeyboardInterrupt, SystemExit): #pragma: no cover - raise - except: + except Exception: self.handleError(record) def close(self): @@ -877,9 +873,7 @@ self.socket.sendto(msg, self.address) else: self.socket.sendall(msg) - except (KeyboardInterrupt, SystemExit): #pragma: no cover - raise - except: + except Exception: self.handleError(record) class SMTPHandler(logging.Handler): @@ -957,9 +951,7 @@ smtp.login(self.username, self.password) smtp.sendmail(self.fromaddr, self.toaddrs, msg) smtp.quit() - except (KeyboardInterrupt, SystemExit): #pragma: no cover - raise - except: + except Exception: self.handleError(record) class NTEventLogHandler(logging.Handler): @@ -1044,9 +1036,7 @@ type = self.getEventType(record) msg = self.format(record) self._welu.ReportEvent(self.appname, id, cat, type, [msg]) - except (KeyboardInterrupt, SystemExit): #pragma: no cover - raise - except: + except Exception: self.handleError(record) def close(self): @@ -1131,9 +1121,7 @@ if self.method == "POST": h.send(data.encode('utf-8')) h.getresponse() #can't do anything with the result - except (KeyboardInterrupt, SystemExit): #pragma: no cover - raise - except: + except Exception: self.handleError(record) class BufferingHandler(logging.Handler): @@ -1313,9 +1301,7 @@ """ try: self.enqueue(self.prepare(record)) - except (KeyboardInterrupt, SystemExit): #pragma: no cover - raise - except: + except Exception: self.handleError(record) if threading: diff -r 58c90cf81293 Lib/test/test_re.py --- a/Lib/test/test_re.py Fri Oct 05 14:10:57 2012 +0300 +++ b/Lib/test/test_re.py Fri Oct 05 20:21:10 2012 +0300 @@ -948,7 +948,8 @@ if outcome == SYNTAX_ERROR: pass # Expected a syntax error else: print('=== Syntax error:', t) - except KeyboardInterrupt: raise KeyboardInterrupt + except KeyboardInterrupt: + raise except: print('*** Unexpected error ***', t) if verbose: diff -r 58c90cf81293 Lib/test/test_uu.py --- a/Lib/test/test_uu.py Fri Oct 05 14:10:57 2012 +0300 +++ b/Lib/test/test_uu.py Fri Oct 05 20:21:10 2012 +0300 @@ -127,15 +127,11 @@ return try: f.close() - except (SystemExit, KeyboardInterrupt): - raise - except: + except Exception: pass try: os.unlink(f.name) - except (SystemExit, KeyboardInterrupt): - raise - except: + except Exception: pass def setUp(self): diff -r 58c90cf81293 Lib/tkinter/font.py --- a/Lib/tkinter/font.py Fri Oct 05 14:10:57 2012 +0300 +++ b/Lib/tkinter/font.py Fri Oct 05 20:21:10 2012 +0300 @@ -112,8 +112,6 @@ try: if self.delete_font: self._call("font", "delete", self.name) - except (KeyboardInterrupt, SystemExit): - raise except Exception: pass diff -r 58c90cf81293 Lib/unittest/test/support.py --- a/Lib/unittest/test/support.py Fri Oct 05 14:10:57 2012 +0300 +++ b/Lib/unittest/test/support.py Fri Oct 05 20:21:10 2012 +0300 @@ -25,8 +25,6 @@ try: if not hash(obj_1) == hash(obj_2): self.fail("%r and %r do not hash equal" % (obj_1, obj_2)) - except KeyboardInterrupt: - raise except Exception as e: self.fail("Problem hashing %r and %r: %s" % (obj_1, obj_2, e)) @@ -35,8 +33,6 @@ if hash(obj_1) == hash(obj_2): self.fail("%s and %s hash equal, but shouldn't" % (obj_1, obj_2)) - except KeyboardInterrupt: - raise except Exception as e: self.fail("Problem hashing %s and %s: %s" % (obj_1, obj_2, e))