Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archinstall/lib/user_interaction/subvolume_config.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/archinstall/lib/user_interaction/subvolume_config.py b/archinstall/lib/user_interaction/subvolume_config.py
index bb159a8b..7383b13d 100644
--- a/archinstall/lib/user_interaction/subvolume_config.py
+++ b/archinstall/lib/user_interaction/subvolume_config.py
@@ -1,6 +1,7 @@
-from typing import Dict
+from typing import Dict, List
from ..menu.list_manager import ListManager
+from ..menu.menu import MenuSelectionType
from ..menu.selection_menu import Selector, GeneralMenu
from ..menu.text_input import TextInput
from ..menu import Menu
@@ -25,6 +26,7 @@ class SubvolumeList(ListManager):
text += _(" mounted at {:16}").format(value['mountpoint'])
else:
text += (' ' * 28)
+
if value.get('options',[]):
text += _(" with option {}").format(', '.join(value['options']))
return text
@@ -126,7 +128,17 @@ class SubvolumeMenu(GeneralMenu):
def _select_subvolume_mount_point(self,value):
return TextInput(str(_("Select a mount point :")),value).run()
- def _select_subvolume_options(self,value):
+ def _select_subvolume_options(self,value) -> List[str]:
# def __init__(self, title, p_options, skip=True, multi=False, default_option=None, sort=True):
- return Menu(str(_("Select the desired subvolume options ")),['nodatacow','compress'],
- skip=True,preset_values=value,multi=True).run()
+ choice = Menu(
+ str(_("Select the desired subvolume options ")),
+ ['nodatacow','compress'],
+ skip=True,
+ preset_values=value,
+ multi=True
+ ).run()
+
+ if choice.type_ == MenuSelectionType.Selection:
+ return choice.value
+
+ return []