Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/menu/selection_menu.py
diff options
context:
space:
mode:
authorDaniel Girtler <blackrabbit256@gmail.com>2022-05-18 21:59:49 +1000
committerGitHub <noreply@github.com>2022-05-18 13:59:49 +0200
commit65a5a335aa21ea44fd99fb200e238df54b3c2e47 (patch)
tree5b7a1d3937fc283c91734b7ab4f06e376bb59fdb /archinstall/lib/menu/selection_menu.py
parent089c46db4a3c89dd8ba670419369c405bec3a270 (diff)
Enhance view (#1210)
* Add preview for menu entries * Fix mypy * Update * Update * Fix mypy Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Diffstat (limited to 'archinstall/lib/menu/selection_menu.py')
-rw-r--r--archinstall/lib/menu/selection_menu.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/archinstall/lib/menu/selection_menu.py b/archinstall/lib/menu/selection_menu.py
index 26be4cc7..57e290f1 100644
--- a/archinstall/lib/menu/selection_menu.py
+++ b/archinstall/lib/menu/selection_menu.py
@@ -15,7 +15,7 @@ if TYPE_CHECKING:
_: Any
-def select_archinstall_language(preset_value: str) -> Optional[str]:
+def select_archinstall_language(preset_value: str) -> Optional[Any]:
"""
copied from user_interaction/general_conf.py as a temporary measure
"""
@@ -487,6 +487,8 @@ class GeneralMenu:
match choice.type_:
case MenuSelectionType.Esc: return preset
case MenuSelectionType.Selection:
- return pathlib.Path(list(fido_devices.keys())[int(choice.value.split('|',1)[0])])
+ selection: Any = choice.value
+ index = int(selection.split('|',1)[0])
+ return pathlib.Path(list(fido_devices.keys())[index])
- return None \ No newline at end of file
+ return None