Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-03-21 14:34:03 +0100
committerAnton Hvornum <anton@hvornum.se>2021-03-21 14:34:03 +0100
commit1fb61bf8fcb5319cc5e1e99d9b92763f1271ae33 (patch)
treed5899a705780d9d013181de717e57e034a577dac /archinstall
parente1e1a916fcb8b769f0be4c5fa303a2eb5670c19b (diff)
Debugging tainted namespace on profile modules.
Diffstat (limited to 'archinstall')
-rw-r--r--archinstall/lib/profiles.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/archinstall/lib/profiles.py b/archinstall/lib/profiles.py
index bafa76df..f90facc8 100644
--- a/archinstall/lib/profiles.py
+++ b/archinstall/lib/profiles.py
@@ -129,7 +129,7 @@ class Script():
if namespace:
self.namespace = namespace
- if '.py' in self.namespace:
+ if '.py.py' in self.namespace:
raise KeyError("Debugging")
self.spec = importlib.util.spec_from_file_location(self.namespace, self.path)
@@ -173,6 +173,7 @@ class Profile(Script):
# trigger a traditional:
# if __name__ == 'moduleName'
if '__name__' in source_data and '_prep_function' in source_data:
+ print(f"Checking if {self} has _prep_function by importing with namespace {self.namespace}.py")
with self.load_instructions(namespace=f"{self.namespace}.py") as imported:
if hasattr(imported, '_prep_function'):
return True