index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Daniel Girtler <blackrabbit256@gmail.com> | 2022-05-09 20:02:48 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-09 12:02:48 +0200 |
commit | 0fa52a5424e28ed62ef84bdc92868bbfc434e015 (patch) | |
tree | 4b88e7799319aa9489f7e16beedf5517b6feba34 /profiles/server.py | |
parent | 20ffebac50478554a7582de5e5c1d8b4504ea8be (diff) |
-rw-r--r-- | profiles/server.py | 17 |
diff --git a/profiles/server.py b/profiles/server.py index 91ac7cf2..21681c2f 100644 --- a/profiles/server.py +++ b/profiles/server.py @@ -1,8 +1,14 @@ # Used to select various server application profiles on top of a minimal installation. import logging +from typing import Any, TYPE_CHECKING import archinstall +from archinstall import Menu +from archinstall.lib.menu.menu import MenuSelectionType + +if TYPE_CHECKING: + _: Any is_top_level_profile = True @@ -26,15 +32,18 @@ def _prep_function(*args, **kwargs): Magic function called by the importing installer before continuing any further. """ - servers = archinstall.Menu(str(_( + choice = Menu(str(_( 'Choose which servers to install, if none then a minimal installation wil be done')), available_servers, - preset_values=archinstall.storage.get('_selected_servers', []), + preset_values=kwargs['servers'], multi=True ).run() - if servers: - archinstall.storage['_selected_servers'] = servers + if choice.type_ != MenuSelectionType.Selection: + return False + + if choice.value: + archinstall.storage['_selected_servers'] = choice.value return True return False |