diff --git a/scripts/wk/os/win.py b/scripts/wk/os/win.py index 8ba04fd0..b26ef7c2 100644 --- a/scripts/wk/os/win.py +++ b/scripts/wk/os/win.py @@ -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' diff --git a/scripts/wk/setup/win.py b/scripts/wk/setup/win.py index dfcb1265..1b727d25 100644 --- a/scripts/wk/setup/win.py +++ b/scripts/wk/setup/win.py @@ -517,8 +517,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', ) @@ -828,6 +827,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