Make all try_and_print results uppercase

This commit is contained in:
2Shirt 2019-05-10 17:36:30 -06:00
parent a9c874d79e
commit f17da656bb
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
2 changed files with 20 additions and 20 deletions

View file

@ -9,11 +9,11 @@ from settings.browsers import *
browser_data = {} browser_data = {}
other_results = { other_results = {
'Error': { 'Error': {
'MultipleInstallationsError': 'Multiple installations detected', 'MultipleInstallationsError': 'MULTIPLE INSTALLATIONS DETECTED',
}, },
'Warning': { 'Warning': {
'NotInstalledError': 'Not installed', 'NotInstalledError': 'NOT INSTALLED',
'NoProfilesError': 'No profiles found', 'NoProfilesError': 'NO PROFILES FOUND',
} }
} }
@ -385,7 +385,7 @@ def install_adblock(
# installation status. # installation status.
try_and_print(message='{}...'.format(browser), try_and_print(message='{}...'.format(browser),
indent=indent, width=width, indent=indent, width=width,
cs='Done', function=popen_program, cs='STARTED', function=popen_program,
cmd=[exe_path, *urls], check=False) cmd=[exe_path, *urls], check=False)
@ -459,7 +459,7 @@ def scan_for_browsers(just_firefox=False, silent=False, skip_ie=False):
pass pass
else: else:
try_and_print(message='{}...'.format(name), try_and_print(message='{}...'.format(name),
function=get_browser_details, cs='Detected', function=get_browser_details, cs='DETECTED',
other_results=other_results, name=name) other_results=other_results, name=name)

View file

@ -24,23 +24,23 @@ set_log_file('System Setup.log')
# pylint: disable=bad-whitespace,line-too-long # pylint: disable=bad-whitespace,line-too-long
OTHER_RESULTS = { OTHER_RESULTS = {
'Error': { 'Error': {
'BIOSKeyNotFoundError': 'BIOS key not found', 'BIOSKeyNotFoundError': 'BIOS KEY NOT FOUND',
'CalledProcessError': 'Unknown Error', 'CalledProcessError': 'UNKNOWN ERROR',
'FileNotFoundError': 'File not found', 'FileNotFoundError': 'FILE NOT FOUND',
'GenericError': 'Unknown Error', 'GenericError': 'UNKNOWN ERROR',
'Not4KAlignedError': 'False', 'Not4KAlignedError': 'FALSE',
'SecureBootDisabledError': 'Disabled', 'SecureBootDisabledError': 'DISABLED',
'WindowsUnsupportedError': 'Unsupported', 'WindowsUnsupportedError': 'UNSUPPORTED',
}, },
'Warning': { 'Warning': {
'GenericRepair': 'Repaired', 'GenericRepair': 'REPAIRED',
'NoProfilesError': 'No profiles found', 'NoProfilesError': 'NO PROFILES FOUND',
'NotInstalledError': 'Not installed', 'NotInstalledError': 'NOT INSTALLED',
'OSInstalledLegacyError': 'OS installed Legacy', 'OSInstalledLegacyError': 'OS INSTALLED LEGACY',
'SecureBootNotAvailError': 'Not available', 'SecureBootNotAvailError': 'NOT AVAILABLE',
'SecureBootUnknownError': 'Unknown', 'SecureBootUnknownError': 'UNKNOWN',
'UnsupportedOSError': 'Unsupported OS', 'UnsupportedOSError': 'UNSUPPORTED OS',
'WindowsOutdatedError': 'Outdated', 'WindowsOutdatedError': 'OUTDATED',
}, },
} }
SETUP_ACTIONS = OrderedDict({ SETUP_ACTIONS = OrderedDict({