Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-04-22 08:55:54 +0000
committerGitHub <noreply@github.com>2021-04-22 08:55:54 +0000
commit331bb0789b8dad7e0fae4447311c23adaebc6c81 (patch)
tree55f3d5ee12909ceb3692571fe6ecbe6914010f53 /examples
parentbf9f7bdb169b3a70df2e52421145bb02fde608dd (diff)
parent4d65639724e1402ef584221bbbb0e80dba827ab7 (diff)
Merge pull request #325 from SecondThundeR/generic-select-update
Rework of the generic_select function and fixes for various input checks
Diffstat (limited to 'examples')
-rw-r--r--examples/guided.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/guided.py b/examples/guided.py
index 7bf088ca..ef447abb 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -76,7 +76,9 @@ def ask_user_questions():
archinstall.log(f" ** The root would be a simple / and the boot partition /boot (as all paths are relative inside the installation). **")
while True:
# Select a partition
- partition = archinstall.generic_select(partition_mountpoints.keys(),
+ # If we provide keys as options, it's better to convert them to list and sort before passing
+ mountpoints_list = sorted(list(partition_mountpoints.keys()))
+ partition = archinstall.generic_select(mountpoints_list,
"Select a partition by number that you want to set a mount-point for (leave blank when done): ")
if not partition:
break
@@ -162,7 +164,7 @@ def ask_user_questions():
# Ask for archinstall-specific profiles (such as desktop environments etc)
if not archinstall.arguments.get('profile', None):
- archinstall.arguments['profile'] = archinstall.select_profile(filter(lambda profile: (Profile(None, profile).is_top_level_profile()), archinstall.list_profiles()))
+ archinstall.arguments['profile'] = archinstall.select_profile(archinstall.list_profiles(filter_top_level_profiles=True))
else:
archinstall.arguments['profile'] = archinstall.list_profiles()[archinstall.arguments['profile']]