Fix crash when libfido2 is not installed (#1893)
Co-authored-by: ArtikusHG <artiomoleynic@gmail.com>
This commit is contained in:
parent
72661dbf9b
commit
748f03cdb1
|
|
@ -36,7 +36,11 @@ class Fido2:
|
||||||
# to prevent continous reloading which will slow
|
# to prevent continous reloading which will slow
|
||||||
# down moving the cursor in the menu
|
# down moving the cursor in the menu
|
||||||
if not cls._loaded or reload:
|
if not cls._loaded or reload:
|
||||||
ret: Optional[str] = SysCommand(f"systemd-cryptenroll --fido2-device=list").decode('UTF-8')
|
ret = ""
|
||||||
|
try:
|
||||||
|
ret = Optional[str] = SysCommand(f"systemd-cryptenroll --fido2-device=list").decode('UTF-8')
|
||||||
|
except:
|
||||||
|
error('fido2 support is most likely not installed')
|
||||||
if not ret:
|
if not ret:
|
||||||
error('Unable to retrieve fido2 devices')
|
error('Unable to retrieve fido2 devices')
|
||||||
return []
|
return []
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue