Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/disk/fido.py
diff options
context:
space:
mode:
authorDaniel Girtler <blackrabbit256@gmail.com>2023-05-04 00:36:46 +1000
committerGitHub <noreply@github.com>2023-05-03 16:36:46 +0200
commitec4ecbcb7a839ab06b739f01ce42bfd18376c620 (patch)
treeb617783f2d7cb4d4bf32690590859e68666bf3d4 /archinstall/lib/disk/fido.py
parente78ddb03e1bbc46e59fd6a9889699b12808d0fec (diff)
Full mypy compliance and small fixes (#1777)
* Fix mypy compliance --------- Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Diffstat (limited to 'archinstall/lib/disk/fido.py')
-rw-r--r--archinstall/lib/disk/fido.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/archinstall/lib/disk/fido.py b/archinstall/lib/disk/fido.py
index 436be4d4..2a53b551 100644
--- a/archinstall/lib/disk/fido.py
+++ b/archinstall/lib/disk/fido.py
@@ -2,7 +2,8 @@ from __future__ import annotations
import getpass
import logging
-from typing import List
+from pathlib import Path
+from typing import List, Optional
from .device_model import PartitionModification, Fido2Device
from ..general import SysCommand, SysCommandWorker, clear_vt100_escape_codes
@@ -36,12 +37,12 @@ class Fido2:
# to prevent continous reloading which will slow
# down moving the cursor in the menu
if not cls._loaded or reload:
- ret = SysCommand(f"systemd-cryptenroll --fido2-device=list").decode('UTF-8')
+ ret: Optional[str] = SysCommand(f"systemd-cryptenroll --fido2-device=list").decode('UTF-8')
if not ret:
log('Unable to retrieve fido2 devices', level=logging.ERROR)
return []
- fido_devices = clear_vt100_escape_codes(ret)
+ fido_devices: str = clear_vt100_escape_codes(ret) # type: ignore
manufacturer_pos = 0
product_pos = 0
@@ -58,7 +59,7 @@ class Fido2:
product = line[product_pos:]
devices.append(
- Fido2Device(path, manufacturer, product)
+ Fido2Device(Path(path), manufacturer, product)
)
cls._loaded = True