Updated browsers.py
This commit is contained in:
parent
a269859b17
commit
6a3e225192
1 changed files with 425 additions and 422 deletions
|
|
@ -229,7 +229,7 @@ def clean_mozilla_profile(profile):
|
|||
f.write('user_pref("{}", {});\n'.format(k, v))
|
||||
|
||||
def get_browser_details(name):
|
||||
"""Get installation status and profile details for all supported browsers."""
|
||||
"""Get install status and profile details for all supported browsers."""
|
||||
browser = SUPPORTED_BROWSERS[name].copy()
|
||||
|
||||
# Update user_data_path
|
||||
|
|
@ -451,8 +451,8 @@ def install_adblock(indent=8, width=32, just_firefox=False):
|
|||
|
||||
def list_homepages(indent=8, width=32):
|
||||
"""List current homepages for reference."""
|
||||
|
||||
for browser in [k for k, v in sorted(browser_data.items()) if v['exe_path']]:
|
||||
browser_list = [k for k, v in sorted(browser_data.items()) if v['exe_path']]
|
||||
for browser in browser_list:
|
||||
# Skip Chromium-based browsers
|
||||
if browser_data[browser]['base'] == 'chromium':
|
||||
print_info(
|
||||
|
|
@ -481,7 +481,8 @@ def list_homepages(indent=8, width=32):
|
|||
|
||||
def reset_browsers(indent=8, width=32):
|
||||
"""Reset all detected browsers to safe defaults."""
|
||||
for browser in [k for k, v in sorted(browser_data.items()) if v['profiles']]:
|
||||
browser_list = [k for k, v in sorted(browser_data.items()) if v['profiles']]
|
||||
for browser in browser_list:
|
||||
print_info('{indent}{name}'.format(indent=' '*indent, name=browser))
|
||||
for profile in browser_data[browser]['profiles']:
|
||||
if browser_data[browser]['base'] == 'chromium':
|
||||
|
|
@ -506,3 +507,5 @@ def scan_for_browsers(just_firefox=False):
|
|||
|
||||
if __name__ == '__main__':
|
||||
print("This file is not meant to be called directly.")
|
||||
|
||||
# vim: sts=2 sw=2 ts=2
|
||||
|
|
|
|||
Loading…
Reference in a new issue