Make plugin loader look in directories relative to cwd

Make the plugin loader also look for plugins using a path relative to
the current working directory.
This commit is contained in:
Frej Drejhammar
2024-02-16 17:06:51 +01:00
parent 878ba44f48
commit 21ab3f347b

View File

@@ -5,7 +5,7 @@ PluginFolder = os.path.join(os.path.dirname(os.path.realpath(__file__)),"..","pl
MainModule = "__init__" MainModule = "__init__"
def get_plugin(name, plugin_path): def get_plugin(name, plugin_path):
search_dirs = [PluginFolder] search_dirs = [PluginFolder, '.']
if plugin_path: if plugin_path:
search_dirs = [plugin_path] + search_dirs search_dirs = [plugin_path] + search_dirs
for dir in search_dirs: for dir in search_dirs: