Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/profiles
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2021-01-22 13:53:04 +0100
committerGitHub <noreply@github.com>2021-01-22 13:53:04 +0100
commit5b7af12a9190bb06a4f12308f7ba1cc4c1101b6b (patch)
tree67fb7464320a532974f17ed4e3457ecabcb14a41 /profiles
parenta54c6e3c2f702d5a5364903bc5a5d20bc6e097ec (diff)
Safety checks prohibited this from running
The safety mechanism prevents the installation-code under `if __name__` to run when importing to check for the `_prep_function`. when the import for `_prep_function` check is executed it imports with a bogus `__name__` override. This is to protect anything under if `__name__` from running just to be able to import and run `_prep_function()`. After that is done and the actual installation begins, it imports with a proper `__name__`, The namespace is `filename` minus the `.extension` *(.py)*, normally imports of modules with dashes (`-`) in the name is prohibited, but archintall's import mechanism supports this as it's a string-import via `importlib`. So modified to `if __name__ == 'kde-wayland'` and that worked great : )
Diffstat (limited to 'profiles')
-rw-r--r--profiles/kde-wayland.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/profiles/kde-wayland.py b/profiles/kde-wayland.py
index 66d31504..31226952 100644
--- a/profiles/kde-wayland.py
+++ b/profiles/kde-wayland.py
@@ -22,7 +22,7 @@ def _prep_function(*args, **kwargs):
# Ensures that this code only gets executed if executed
# through importlib.util.spec_from_file_location("kde", "/somewhere/kde.py")
# or through conventional import kde
-if __name__ == 'kde':
+if __name__ == 'kde-wayland':
# Install dependency profiles
installation.install_profile('xorg')