derive Exit from KeyboardInterrupt to simplify exception catching

--HG--
branch : trunk
This commit is contained in:
holger krekel
2009-05-22 13:01:48 +02:00
parent 4bc352cc7d
commit 30e04b1ec6
3 changed files with 14 additions and 7 deletions

View File

@@ -36,11 +36,11 @@ class ExceptionFailure(Failed):
self.expr = expr
self.expected = expected
class Exit(Exception):
class Exit(KeyboardInterrupt):
""" for immediate program exits without tracebacks and reporter/summary. """
def __init__(self, msg="unknown reason"):
self.msg = msg
Exception.__init__(self, msg)
KeyboardInterrupt.__init__(self, msg)
# exposed helper methods