atexit.register in case of errors

Miki Tebeka miki.tebeka at
Wed Feb 15 19:40:00 CET 2012

Another option is to use a global error flag and set it in sys.excepthook (see

goodbye will check the error flag and skip execution if error flag is set.

More information about the Python-list mailing list