index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Daniel <blackrabbit256@gmail.com> | 2022-04-22 21:24:12 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-22 13:24:12 +0200 |
commit | 477b5b120e120766d789a691fce60cec843aff43 (patch) | |
tree | d2580a7510c2c3ffff694d6145ee1b93c1fd6ea6 /archinstall/lib/menu/global_menu.py | |
parent | 2529d6a5f59eb6a16f95bf9d1117a6033c527df9 (diff) |
-rw-r--r-- | archinstall/lib/menu/global_menu.py | 15 |
diff --git a/archinstall/lib/menu/global_menu.py b/archinstall/lib/menu/global_menu.py index 50d3180b..fba0ce29 100644 --- a/archinstall/lib/menu/global_menu.py +++ b/archinstall/lib/menu/global_menu.py @@ -1,11 +1,12 @@ from __future__ import annotations -from typing import Any, List, Optional +from typing import Any, List, Optional, Union from ..menu import Menu from ..menu.selection_menu import Selector, GeneralMenu from ..general import SysCommand, secret from ..hardware import has_uefi +from ..models import NetworkConfiguration from ..storage import storage from ..output import log from ..profiles import is_desktop_profile @@ -139,7 +140,7 @@ class GlobalMenu(GeneralMenu): Selector( _('Configure network'), ask_to_configure_network, - display_func=lambda x: x if x else _('Not configured, unavailable unless setup manually'), + display_func=lambda x: self._prev_network_configuration(x), default={}) self._menu_options['timezone'] = \ Selector( @@ -192,6 +193,16 @@ class GlobalMenu(GeneralMenu): return _('Install ({} config(s) missing)').format(missing) return 'Install' + def _prev_network_configuration(self, cur_value: Union[NetworkConfiguration, List[NetworkConfiguration]]) -> str: + if not cur_value: + return _('Not configured, unavailable unless setup manually') + else: + if isinstance(cur_value, list): + ifaces = [x.iface for x in cur_value] + return f'Configured ifaces: {ifaces}' + else: + return str(cur_value) + def _prev_install_missing_config(self) -> Optional[str]: if missing := self._missing_configs(): text = str(_('Missing configurations:\n')) |