summaryrefslogtreecommitdiff
path: root/python/scriptingprovider.py
diff options
context:
space:
mode:
authorJordan Wiens <jordan@psifertex.com>2021-07-15 03:39:25 -0400
committerJordan Wiens <jordan@psifertex.com>2021-07-29 10:42:06 -0400
commit1a4a0f56dc17e68e5743fa3a550b46992ec461e1 (patch)
tree33fbee198f54af7fa173a016b3ef71b3c7e49e28 /python/scriptingprovider.py
parentc08ddcab02433cb5078b6cfea11bf972e47b3169 (diff)
support for repository plugins loaded from a subdirectory
Diffstat (limited to 'python/scriptingprovider.py')
-rw-r--r--python/scriptingprovider.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/scriptingprovider.py b/python/scriptingprovider.py
index 51972ae9..473cd36f 100644
--- a/python/scriptingprovider.py
+++ b/python/scriptingprovider.py
@@ -831,7 +831,10 @@ class PythonScriptingProvider(ScriptingProvider):
if plugin_full_path not in sys.path:
sys.path.append(plugin_full_path)
- __import__(module)
+ if plugin.subdir:
+ __import__(module + "." + plugin.subdir.replace("/", "."))
+ else:
+ __import__(module)
return True
except KeyError:
log.log_error(f"Failed to find python plugin: {repo_path}/{module}")