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.feeds@gmail.com>2021-05-24 14:40:21 +0200
committerAnton Hvornum <anton.feeds@gmail.com>2021-05-24 14:40:21 +0200
commit0d0dfc8ebec5ed957686a7c42095bcbcc8b2059d (patch)
tree3e5742dcf0fa153f56a10d89bf652d427e7604c7 /archinstall
parent1773efbe45a60af49394fbf274f584cb50a758ac (diff)
Added/moved comments.
Diffstat (limited to 'archinstall')
-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()