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-03-21 15:04:23 +0100
committerAnton Hvornum <anton@hvornum.se>2021-03-21 15:04:23 +0100
commit9ee64797011b541b38e68610a746eb6f303ab63d (patch)
tree3426971f2a94e9e497edbd03add882b61b52799c /examples
parent27bde44b8de447e8612a83bc6964fc1b5237e07d (diff)
Enabling load_instructions() to set a temporary namespace, and then reverting it after the instructions are loaded. This is to temporarly override the namespace during import - enabling avoidance of triggering __name__ checks, and at the same time reverting back the namespace automatically to enable .execute() on the script (reusability of classes)
Diffstat (limited to 'examples')
-rw-r--r--examples/guided.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/guided.py b/examples/guided.py
index f4fc533b..4e3dd082 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -170,7 +170,7 @@ def ask_user_questions():
# Check the potentially selected profiles preperations to get early checks if some additional questions are needed.
if archinstall.arguments['profile'] and archinstall.arguments['profile'].has_prep_function():
print(f"{archinstall.arguments['profile']} has prep-function, loading with namespace {archinstall.arguments['profile'].namespace}.py")
- with archinstall.arguments['profile'].load_instructions(namespace=f"{archinstall.arguments['profile'].namespace}.py") as imported:
+ with archinstall.arguments['profile'].load_instructions(namespace=f"{archinstall.arguments['profile'].namespace}.py", reset_namespace=True) as imported:
if not imported._prep_function():
archinstall.log(
' * Profile\'s preparation requirements was not fulfilled.',