mirror of https://github.com/searx/searx
Merge pull request #2635 from return42/einit
[mod] don't dump traceback of SearxEngineResponseException on init
This commit is contained in:
commit
70c38a93d0
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue