Merge remote-tracking branch 'upstream/dev' into dev

This commit is contained in:
2Shirt 2021-11-10 23:01:11 -07:00
commit 40d0b302f1
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
2 changed files with 9 additions and 4 deletions

View file

@ -599,8 +599,9 @@ def is_secure_boot_enabled(raise_exceptions=False, show_alert=False):
msg_warning = 'DISABLED\n\nOS installed LEGACY'
else:
# Command completed
enabled = 'True' in proc.stdout
if 'False' in proc.stdout:
if 'True' in proc.stdout:
enabled = True
elif 'False' in proc.stdout:
msg_error = 'DISABLED'
else:
msg_warning = 'UNKNOWN'

View file

@ -593,8 +593,7 @@ def auto_show_os_name():
def auto_show_secure_boot_status():
"""Display Secure Boot status."""
TRY_PRINT.run(
'Secure Boot...', is_secure_boot_enabled,
raise_exceptions=True, show_alert=True,
'Secure Boot...', check_secure_boot_status, msg_good='Enabled',
)
@ -923,6 +922,11 @@ def uninstall_firefox():
# Misc Functions
def check_secure_boot_status():
"""Check Secure Boot status."""
is_secure_boot_enabled(raise_exceptions=True, show_alert=True)
def get_firefox_default_profile(profiles_ini):
"""Get Firefox default profile, returns(pathlib.Path, encoding) or None."""
default_profile = None