Avoid stall when enabling/installing uBlock Origin

* Fixes issue #89
This commit is contained in:
2Shirt 2019-05-07 15:27:43 -06:00
parent 7b65833c20
commit baebac669e
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
4 changed files with 8 additions and 11 deletions

View file

@ -328,7 +328,6 @@ def install_adblock(
if skip_firefox and browser_data[browser]['base'] == 'mozilla':
continue
exe_path = browser_data[browser].get('exe_path', None)
function=run_program
if not exe_path:
if browser_data[browser]['profiles']:
print_standard(
@ -378,7 +377,6 @@ def install_adblock(
elif browser_data[browser]['base'] == 'ie':
urls.append(IE_GALLERY)
function=popen_program
# By using check=False we're skipping any return codes so
# it should only fail if the program can't be run
@ -387,7 +385,7 @@ def install_adblock(
# installation status.
try_and_print(message='{}...'.format(browser),
indent=indent, width=width,
cs='Done', function=function,
cs='Done', function=popen_program,
cmd=[exe_path, *urls], check=False)

View file

@ -120,14 +120,9 @@ if __name__ == '__main__':
# Configure software
print_info('Configuring programs')
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()
print_standard('Please enable uBlock Origin for all browsers.')
pause()
if global_vars['OS']['Version'] == '10':
try_and_print(message='ClassicStart...',
function=config_classicstart, cs='Done')

View file

@ -31,6 +31,8 @@ if __name__ == '__main__':
# Install uBlock Origin
print_info('Installing uBlock Origin')
install_adblock(just_firefox=True)
print_standard('Please enable uBlock Origin in Firefox.')
pause()
# Cleanup
print_info('Cleanup')

View file

@ -65,6 +65,8 @@ if __name__ == '__main__':
print_info('Configuring programs')
if answer_config_browsers:
install_adblock(skip_firefox=D7_MODE)
print_standard('Please enable uBlock Origin')
pause()
if global_vars['OS']['Version'] == '10':
if answer_config_classicshell:
try_and_print(message='ClassicStart...',