diff --git a/app.py b/app.py index 6a132b6..bb11316 100644 --- a/app.py +++ b/app.py @@ -34,6 +34,12 @@ def exit_handler(): atexit.register(exit_handler) + def exit(*args, **kwargs): + excepthook.exception = True + sys.exit(*args, **kwargs) +else: + exit = sys.exit + if platform.system() == 'Windows': import win32console, win32gui, win32con @@ -161,7 +167,7 @@ def extract(data, *keys, default=None): print('Gamma range is currently limited. To fix that, please\n' ' (1) run set_max_gamma_range.reg, then\n' ' (2) reboot PC for it to take effect!') - sys.exit() + exit() print("Don't forget to set the launch option -nogammaramp!\n")