From e344021b58ee1773bc367ee80e46acd89f6d0a4d Mon Sep 17 00:00:00 2001 From: Didr Date: Tue, 7 Dec 2021 14:54:59 +0100 Subject: Add handling of default options in multi-choice menus In multiple choice menu: Return `self.default_option` instead of visible name if visible name contains " (default)". --- archinstall/lib/menu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archinstall/lib') diff --git a/archinstall/lib/menu.py b/archinstall/lib/menu.py index c3436803..6f1c2237 100644 --- a/archinstall/lib/menu.py +++ b/archinstall/lib/menu.py @@ -68,7 +68,7 @@ class Menu(TerminalMenu): idx = self.show() if idx is not None: if isinstance(idx, (list, tuple)): - return [self.menu_options[i] for i in idx] + return [self.default_option if ' (default)' in self.menu_options[i] else self.menu_options[i] for i in idx] else: selected = self.menu_options[idx] if ' (default)' in selected and self.default_option: -- cgit v1.2.3-70-g09d2