From ea60c0382776167e83952159b50534a8b3e3074c Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Mon, 6 Sep 2021 22:44:22 +0200 Subject: [PATCH] [fix] fix openstreetmap engine close #298 This is a workaround: inside engine code, any call to function in another engine can crash since the logger won't be initialized except if it is done explicitly. --- searx/engines/openstreetmap.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/searx/engines/openstreetmap.py b/searx/engines/openstreetmap.py index 6920356c3..721769a25 100644 --- a/searx/engines/openstreetmap.py +++ b/searx/engines/openstreetmap.py @@ -439,3 +439,8 @@ 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