From aa5a5147b2a9c08f84c29a8bd2707bd0f170b3d8 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Thu, 7 Oct 2021 18:41:41 +0200 Subject: [PATCH] [fix] searx.plugins.initialize() - don't miss module & module-name Signed-off-by: Markus Heiser --- searx/plugins/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/searx/plugins/__init__.py b/searx/plugins/__init__.py index f35ee610a..dd18ff3d5 100644 --- a/searx/plugins/__init__.py +++ b/searx/plugins/__init__.py @@ -234,9 +234,9 @@ def plugin_module_names(): yield_plugins = set() # embedded plugins - for module_name in iter_modules(path=[dirname(__file__)]): - yield (module_name, False) - yield_plugins.add(module_name) + for module in iter_modules(path=[dirname(__file__)]): + yield (__name__ + "." + module.name, False) + yield_plugins.add(module.name) # external plugins for module_name in settings['plugins']: if module_name not in yield_plugins: @@ -246,6 +246,6 @@ def plugin_module_names(): def initialize(app): for module_name, external in plugin_module_names(): - plugin = load_and_initialize_plugin(__name__ + "." + module_name.name, external, (app, settings)) + plugin = load_and_initialize_plugin(module_name, external, (app, settings)) if plugin: plugins.register(plugin)