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-12 02:30:09 +1000
committerGitHub <noreply@github.com>2023-05-11 18:30:09 +0200
commit89cefb9a1c7d4c4968e7d8645149078e601c9d1c (patch)
tree12c84bdcef1b0ef3f8a21977e25c7f0f89388138 /archinstall/lib/disk/fido.py
parent6e6b850a8f687b193172aaa321d49bd2956c1d4f (diff)
Cleanup imports and unused code (#1801)
* Cleanup imports and unused code * Update build check * Keep deprecation exception * Simplify logging --------- Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Diffstat (limited to 'archinstall/lib/disk/fido.py')
-rw-r--r--archinstall/lib/disk/fido.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/archinstall/lib/disk/fido.py b/archinstall/lib/disk/fido.py
index 2a53b551..97c38d84 100644
--- a/archinstall/lib/disk/fido.py
+++ b/archinstall/lib/disk/fido.py
@@ -1,13 +1,12 @@
from __future__ import annotations
import getpass
-import logging
from pathlib import Path
from typing import List, Optional
from .device_model import PartitionModification, Fido2Device
from ..general import SysCommand, SysCommandWorker, clear_vt100_escape_codes
-from ..output import log
+from ..output import error, info
class Fido2:
@@ -39,7 +38,7 @@ class Fido2:
if not cls._loaded or reload:
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)
+ error('Unable to retrieve fido2 devices')
return []
fido_devices: str = clear_vt100_escape_codes(ret) # type: ignore
@@ -88,8 +87,4 @@ class Fido2:
worker.write(bytes(getpass.getpass(" "), 'UTF-8'))
pin_inputted = True
- log(
- f"You might need to touch the FIDO2 device to unlock it if no prompt comes up after 3 seconds.",
- level=logging.INFO,
- fg="yellow"
- )
+ info('You might need to touch the FIDO2 device to unlock it if no prompt comes up after 3 seconds')