def __run__(self, *args, **kwargs): try: Thread.__run__(self, *args, **kwargs) except (KeyboardInterrupt, SystemExit): raise except: sys.excepthook(*sys.exc_info())