parent
ea4942bbc4
commit
7156578124
1 changed files with 8 additions and 2 deletions
|
|
@ -176,9 +176,15 @@ def check_if_av_scan_is_needed():
|
||||||
# Check date and prompt tech if necessary
|
# Check date and prompt tech if necessary
|
||||||
last_run_date = datetime.strptime(last_run, '%Y-%m-%d')
|
last_run_date = datetime.strptime(last_run, '%Y-%m-%d')
|
||||||
if datetime.now() - last_run_date < timedelta(days=FAB_TIMEFRAME):
|
if datetime.now() - last_run_date < timedelta(days=FAB_TIMEFRAME):
|
||||||
ui.print_warning('Fab was recently run, an AV scan may be needed.')
|
ui.print_warning('Fab was recently run, Auto Repairs may be needed.')
|
||||||
if not ui.ask('Continue with setup?'):
|
selection = ui.choice(
|
||||||
|
'Continue with Auto Setup, run Auto Repairs, or Quit?', ['C', 'R', 'Q'],
|
||||||
|
)
|
||||||
|
if selection == 'Q':
|
||||||
ui.abort()
|
ui.abort()
|
||||||
|
if selection == 'R':
|
||||||
|
auto_repairs_script = find_kit_dir('Scripts').joinpath('auto_repairs.py')
|
||||||
|
os.execv(sys.executable, ['python', auto_repairs_script])
|
||||||
|
|
||||||
|
|
||||||
def check_os_and_set_menu_title(title) -> str:
|
def check_os_and_set_menu_title(title) -> str:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue