Another option is to use a global error flag and set it in sys.excepthook (see http://docs.python.org/library/sys.html#sys.excepthook). goodbye will check the error flag and skip execution if error flag is set.