mirror of
https://github.com/searxng/searxng.git
synced 2025-12-22 19:50:00 +00:00
[fix] logger per engine: make .logger is always initialized
the openstreetmap engine imports code from the wikidata engine. before this commit, specific code make sure to copy the logger variable to the wikidata engine. with this commit searx.engines.load_engine makes sure the .logger is initialized. The implementation scans sys.modules for module name starting with searx.engines.
This commit is contained in:
@@ -438,8 +438,3 @@ def get_key_label(key_name, lang):
|
||||
if labels is None:
|
||||
return None
|
||||
return get_label(labels, lang)
|
||||
|
||||
|
||||
def init(_):
|
||||
import searx.engines.wikidata # pylint: disable=import-outside-toplevel
|
||||
searx.engines.wikidata.logger = logger
|
||||
|
||||
Reference in New Issue
Block a user