1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-05 04:40:11 +01:00

Merge pull request #2635 from return42/einit

[mod] don't dump traceback of SearxEngineResponseException on init
This commit is contained in:
Alexandre Flament 2021-03-05 21:55:00 +01:00 committed by GitHub
commit 70c38a93d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,6 +26,7 @@ from operator import itemgetter
from searx import settings
from searx import logger
from searx.data import ENGINES_LANGUAGES
from searx.exceptions import SearxEngineResponseException
from searx.poolrequests import get, get_proxy_cycles
from searx.utils import load_module, match_language, get_engine_from_settings, gen_useragent
@ -291,6 +292,8 @@ def initialize_engines(engine_list):
def engine_init(engine_name, init_fn):
try:
init_fn(get_engine_from_settings(engine_name))
except SearxEngineResponseException as exc:
logger.warn('%s engine: Fail to initialize // %s', engine_name, exc)
except Exception:
logger.exception('%s engine: Fail to initialize', engine_name)
else: