Apply bugfixes
This commit is contained in:
parent
aa0e35cbaa
commit
b7d54e1469
2 changed files with 13 additions and 7 deletions
|
|
@ -219,7 +219,7 @@ def get_installed_ram(as_list=False, raise_exceptions=False):
|
||||||
if raise_exceptions:
|
if raise_exceptions:
|
||||||
if RAM_OK > mem.total >= RAM_WARNING:
|
if RAM_OK > mem.total >= RAM_WARNING:
|
||||||
raise GenericWarning(mem_str)
|
raise GenericWarning(mem_str)
|
||||||
if mem.total > RAM_WARNING:
|
if mem.total < RAM_WARNING:
|
||||||
raise GenericError(mem_str)
|
raise GenericError(mem_str)
|
||||||
|
|
||||||
# Done
|
# Done
|
||||||
|
|
@ -276,6 +276,11 @@ def get_raw_disks():
|
||||||
json_data = get_json_from_command(cmd)
|
json_data = get_json_from_command(cmd)
|
||||||
raw_disks = []
|
raw_disks = []
|
||||||
|
|
||||||
|
# Bail early
|
||||||
|
if not json_data:
|
||||||
|
# No RAW disks detected
|
||||||
|
return raw_disks
|
||||||
|
|
||||||
# Fix JSON if only one disk was detected
|
# Fix JSON if only one disk was detected
|
||||||
if isinstance(json_data, dict):
|
if isinstance(json_data, dict):
|
||||||
json_data = [json_data]
|
json_data = [json_data]
|
||||||
|
|
@ -595,7 +600,7 @@ def is_secure_boot_enabled(raise_exceptions=False, show_alert=False):
|
||||||
# Command completed
|
# Command completed
|
||||||
enabled = 'True' in proc.stdout
|
enabled = 'True' in proc.stdout
|
||||||
if 'False' in proc.stdout:
|
if 'False' in proc.stdout:
|
||||||
msg_error = 'ERROR'
|
msg_error = 'DISABLED'
|
||||||
else:
|
else:
|
||||||
msg_warning = 'UNKNOWN'
|
msg_warning = 'UNKNOWN'
|
||||||
|
|
||||||
|
|
@ -603,9 +608,8 @@ def is_secure_boot_enabled(raise_exceptions=False, show_alert=False):
|
||||||
for msg, exc in ((msg_error, GenericError), (msg_warning, GenericWarning)):
|
for msg, exc in ((msg_error, GenericError), (msg_warning, GenericWarning)):
|
||||||
if not msg:
|
if not msg:
|
||||||
continue
|
continue
|
||||||
msg = f'Secure Boot {msg}'
|
|
||||||
if show_alert:
|
if show_alert:
|
||||||
show_alert_box(msg)
|
show_alert_box(f'Secure Boot {msg}')
|
||||||
if raise_exceptions:
|
if raise_exceptions:
|
||||||
raise exc(msg)
|
raise exc(msg)
|
||||||
break
|
break
|
||||||
|
|
|
||||||
|
|
@ -645,8 +645,10 @@ def install_firefox():
|
||||||
profile then it is reverted so the original existing profile instead.
|
profile then it is reverted so the original existing profile instead.
|
||||||
"""
|
"""
|
||||||
current_default_profile = None
|
current_default_profile = None
|
||||||
firefox_exe = f'{os.environ["PROGRAMFILES"]}/Mozilla Firefox/firefox.exe'
|
firefox_exe = get_path_obj(
|
||||||
profiles_ini = case_insensitive_path(
|
f'{os.environ["PROGRAMFILES"]}/Mozilla Firefox/firefox.exe',
|
||||||
|
)
|
||||||
|
profiles_ini = get_path_obj(
|
||||||
f'{os.environ["APPDATA"]}/Mozilla/Firefox/profiles.ini',
|
f'{os.environ["APPDATA"]}/Mozilla/Firefox/profiles.ini',
|
||||||
)
|
)
|
||||||
program_path_32bit_exists = False
|
program_path_32bit_exists = False
|
||||||
|
|
@ -673,7 +675,7 @@ def install_firefox():
|
||||||
run_tool('Firefox', 'Firefox', '/S', download=True)
|
run_tool('Firefox', 'Firefox', '/S', download=True)
|
||||||
|
|
||||||
# Open Firefox to force profiles.ini update
|
# Open Firefox to force profiles.ini update
|
||||||
popen_program(firefox_exe)
|
popen_program([firefox_exe])
|
||||||
sleep(5)
|
sleep(5)
|
||||||
kill_procs('firefox.exe', force=True)
|
kill_procs('firefox.exe', force=True)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue