Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples/guided.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/guided.py')
-rw-r--r--examples/guided.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/examples/guided.py b/examples/guided.py
index 1758a397..4cd37972 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -185,15 +185,15 @@ 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(
- ' * Profile\'s preparation requirements was not fulfilled.',
- bg='black',
- fg='red'
- )
- exit(1)
+if archinstall.arguments['profile'] and archinstall.arguments['profile'].has_prep_function():
+ with archinstall.arguments['profile'].load_instructions(namespace=f"{archinstall.arguments['profile'].namespace}.py") as imported:
+ if not imported._prep_function():
+ archinstall.log(
+ ' * Profile\'s preparation requirements was not fulfilled.',
+ bg='black',
+ fg='red'
+ )
+ exit(1)
# Additional packages (with some light weight error handling for invalid package names)
if not archinstall.arguments.get('packages', None):