Catch CTRL+c in new_system_setup.py

Fixes issue #50
This commit is contained in:
2Shirt 2019-02-23 18:07:49 -07:00
parent 85212fb171
commit 054cf25811
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -87,9 +87,13 @@ if __name__ == '__main__':
function=install_ninite_bundle, cs='Started',
mse=answer_mse, libreoffice=answer_libreoffice,
other_results=other_results)
for proc in result['Out']:
# Wait for all processes to finish
proc.wait()
try:
for proc in result['Out']:
# Wait for all processes to finish
print_standard('Waiting for installations to finish...')
proc.wait()
except KeyboardInterrupt:
pass
# Scan for supported browsers
print_info('Scanning for browsers')
@ -108,7 +112,14 @@ if __name__ == '__main__':
# Configure software
print_info('Configuring programs')
install_adblock()
print_standard(' (if stuck press CTRL+c to cancel this step).')
try:
install_adblock()
except KeyboardInterrupt:
print_warning('Configuration interrupted.')
print_standard('Please confirm all browsers have adblock installed.')
if not ask('Continue to next step?'):
abort()
if global_vars['OS']['Version'] == '10':
try_and_print(message='ClassicStart...',
function=config_classicstart, cs='Done')