Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archinstall/lib/plugins.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/archinstall/lib/plugins.py b/archinstall/lib/plugins.py
index bf4b7720..a61be30b 100644
--- a/archinstall/lib/plugins.py
+++ b/archinstall/lib/plugins.py
@@ -80,15 +80,17 @@ def load_plugin(path :str): # -> module (not sure how to write that in type defi
elif parsed_url.scheme in ('https', 'http'):
namespace = import_via_path(localize_path(path))
- # Version dependency via __archinstall__version__ variable (if present) in the plugin
- # Any errors in version inconsistency will be handled through normal error handling if not defined.
if namespace in sys.modules:
+ # Version dependency via __archinstall__version__ variable (if present) in the plugin
+ # Any errors in version inconsistency will be handled through normal error handling if not defined.
if hasattr(sys.modules[namespace], '__archinstall__version__'):
archinstall_major_and_minor_version = float(storage['__version__'][:find_nth(storage['__version__'], '.', 2)])
if sys.modules[namespace].__archinstall__version__ < archinstall_major_and_minor_version:
log(f"Plugin {sys.modules[namespace]} does not support the current Archinstall version.", fg="red", level=logging.ERROR)
+ # Locate the plugin entry-point called Plugin()
+ # This in accordance with the entry_points() from setup.cfg above
if hasattr(sys.modules[namespace], 'Plugin'):
try:
plugins[namespace] = sys.modules[namespace].Plugin()