summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
Diffstat (limited to 'searx')
-rw-r--r--searx/search/checker/__main__.py2
-rw-r--r--searx/search/checker/background.py10
2 files changed, 8 insertions, 4 deletions
diff --git a/searx/search/checker/__main__.py b/searx/search/checker/__main__.py
index 7f6de8f8b..7a85347cc 100644
--- a/searx/search/checker/__main__.py
+++ b/searx/search/checker/__main__.py
@@ -1,4 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
+# lint: pylint
+# pylint: disable=missing-module-docstring, missing-function-docstring
import sys
import io
diff --git a/searx/search/checker/background.py b/searx/search/checker/background.py
index 276426fa7..4c2750b44 100644
--- a/searx/search/checker/background.py
+++ b/searx/search/checker/background.py
@@ -1,4 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
+# lint: pylint
+# pylint: disable=missing-module-docstring, missing-function-docstring
import json
import random
@@ -34,7 +36,7 @@ def _get_every():
return _get_interval(every, 'checker.scheduling.every is not a int or list')
-def get_result():
+def get_result(): # pylint: disable=inconsistent-return-statements
serialized_result = storage.get_str(CHECKER_RESULT)
if serialized_result is not None:
return json.loads(serialized_result)
@@ -47,7 +49,7 @@ def _set_result(result, include_timestamp=True):
def run():
- if not running.acquire(blocking=False):
+ if not running.acquire(blocking=False): # pylint: disable=consider-using-with
return
try:
logger.info('Starting checker')
@@ -66,7 +68,7 @@ def run():
_set_result(result)
logger.info('Check done')
- except Exception:
+ except Exception: # pylint: disable=broad-except
_set_result({'status': 'error'})
logger.exception('Error while running the checker')
finally:
@@ -87,7 +89,7 @@ def _start_scheduling():
run()
-def _signal_handler(signum, frame):
+def _signal_handler(_signum, _frame):
t = threading.Thread(target=run)
t.daemon = True
t.start()