summaryrefslogtreecommitdiff
path: root/searx/search
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2021-08-14 18:22:42 +0200
committerAlexandre Flament <alex@al-f.net>2021-08-16 08:29:16 +0200
commit2f363858b859d6a2e941763f8e0696a317530723 (patch)
tree7ab044f13c7b2604e13ed81c83fb3dec6ab5357f /searx/search
parent9667142d5c45ae52f19b361e69a61900e09fe005 (diff)
downloadsearxng-2f363858b859d6a2e941763f8e0696a317530723.tar.gz
searxng-2f363858b859d6a2e941763f8e0696a317530723.zip
[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
Diffstat (limited to 'searx/search')
-rw-r--r--searx/search/checker/background.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/searx/search/checker/background.py b/searx/search/checker/background.py
index 4c2750b44..f79a5d2df 100644
--- a/searx/search/checker/background.py
+++ b/searx/search/checker/background.py
@@ -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):