Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2021-02-17 13:59:44 +0100
committerAnton Hvornum <anton.feeds@gmail.com>2021-02-17 13:59:44 +0100
commit758b12e6746ac76c57e7725d4e35abbb4805ad23 (patch)
tree6d9f001cddabb3842fedb32ef045e4dbb6e25056
parent03a69eba2e882e430fc9c668c9d334e8818a63c3 (diff)
Simplifying the profile loading a bit, and adding some debugging for it.
-rw-r--r--archinstall/lib/user_interaction.py4
-rw-r--r--examples/guided.py1
2 files changed, 3 insertions, 2 deletions
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py
index 440e41a1..bdf8acaf 100644
--- a/archinstall/lib/user_interaction.py
+++ b/archinstall/lib/user_interaction.py
@@ -188,9 +188,9 @@ def select_profile(options):
if '__name__' in source_data and '_prep_function' in source_data:
with profile.load_instructions(namespace=f"{selected_profile}.py") as imported:
if hasattr(imported, '_prep_function'):
- return profile, imported
+ return imported
- return selected_profile
+ return profile
raise RequirementError("Selecting profiles require a least one profile to be given as an option.")
diff --git a/examples/guided.py b/examples/guided.py
index 3226c69b..1758a397 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -185,6 +185,7 @@ else:
archinstall.arguments['profile'] = archinstall.list_profiles()[archinstall.arguments['profile']]
# Check the potentially selected profiles preperations to get early checks if some additional questions are needed.
+print(archinstall.arguments['profile'])
if archinstall.arguments['profile']:
if not archinstall.arguments['profile']._prep_function():
archinstall.log(