Abort on KeyboardInterrupts
This commit is contained in:
parent
d2fb8250bc
commit
59fd85429c
2 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue