def handleErrorNotify(*args): if args[0].__name__ != "Notify": logging.exception("Unhandled exception") sys.__excepthook__(*args)