1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-22 12:10:11 +01:00

[fix] searx.search.checker.get_result() always return a dict

So checker_results['status'] == 'ok' is enough to check the checker result.
See searx/webapp.py, /preferences endpoint
This commit is contained in:
Alexandre Flament 2021-08-14 18:22:42 +02:00
parent 9667142d5c
commit 2f363858b8

View File

@ -36,10 +36,11 @@ def _get_every():
return _get_interval(every, 'checker.scheduling.every is not a int or list')
def get_result(): # pylint: disable=inconsistent-return-statements
def get_result():
serialized_result = storage.get_str(CHECKER_RESULT)
if serialized_result is not None:
return json.loads(serialized_result)
return {'status': 'unknown'}
def _set_result(result, include_timestamp=True):