Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/menu
diff options
context:
space:
mode:
authorDaemon Coder <11915375+codefiles@users.noreply.github.com>2023-05-07 02:48:46 -0400
committerGitHub <noreply@github.com>2023-05-07 08:48:46 +0200
commita968dccbf1b9c83c8abc40e709c5b1c3142a5f2c (patch)
tree8c643acf37e75b16bd9bab81aa08ab919f898d07 /archinstall/lib/menu
parent232939e910433ceb2c426a3de224587473c03182 (diff)
Fix default value idx in `_determine_cursor_pos()` (#1800)
Co-authored-by: Daniel Girtler <blackrabbit256@gmail.com> Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Diffstat (limited to 'archinstall/lib/menu')
-rw-r--r--archinstall/lib/menu/menu.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/archinstall/lib/menu/menu.py b/archinstall/lib/menu/menu.py
index 12dbf1f5..f3fdb85f 100644
--- a/archinstall/lib/menu/menu.py
+++ b/archinstall/lib/menu/menu.py
@@ -337,7 +337,10 @@ class Menu(TerminalMenu):
if '|' in p:
p = p.replace('|', '\\|')
- idx = self._menu_options.index(p)
+ if p in self._menu_options:
+ idx = self._menu_options.index(p)
+ else:
+ idx = self._menu_options.index(self._default_menu_value)
indexes.append(idx)
except (IndexError, ValueError):
log(f'Error finding index of {p}: {self._menu_options}', level=logging.DEBUG)