fix: define ret as Optional[str] before reassignment in get_fido2_devices (#1894)

This commit is contained in:
Himadri Bhattacharjee 2023-06-23 07:46:30 +00:00 committed by GitHub
parent 748f03cdb1
commit 27a474ed4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -36,9 +36,9 @@ class Fido2:
# to prevent continous reloading which will slow
# down moving the cursor in the menu
if not cls._loaded or reload:
ret = ""
ret: Optional[str] = None
try:
ret = Optional[str] = SysCommand(f"systemd-cryptenroll --fido2-device=list").decode('UTF-8')
ret = SysCommand("systemd-cryptenroll --fido2-device=list").decode('UTF-8')
except:
error('fido2 support is most likely not installed')
if not ret: