Abort on KeyboardInterrupts

This commit is contained in:
2Shirt 2021-05-07 02:38:55 -06:00
parent d2fb8250bc
commit 59fd85429c
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
2 changed files with 7 additions and 1 deletions

View file

@ -88,6 +88,8 @@ BASE_MENUS = {
if __name__ == '__main__':
try:
wk.repairs.win.run_auto_repairs(BASE_MENUS)
except KeyboardInterrupt:
wk.std.abort()
except SystemExit:
raise
except: #pylint: disable=bare-except

View file

@ -36,6 +36,7 @@ from wk.std import (
GenericWarning,
Menu,
TryAndPrint,
abort,
ask,
clear_screen,
color_string,
@ -397,7 +398,10 @@ def run_auto_repairs(base_menus):
for group, menu in menus.items():
if group in ('Main', 'Options'):
continue
run_group(group, menu)
try:
run_group(group, menu)
except KeyboardInterrupt:
abort()
# Done
end_session()