Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/menu/global_menu.py
diff options
context:
space:
mode:
Diffstat (limited to 'archinstall/lib/menu/global_menu.py')
-rw-r--r--archinstall/lib/menu/global_menu.py15
1 files changed, 13 insertions, 2 deletions
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'))