diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2024-03-11 07:45:08 +0100 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarIT.de> | 2024-03-11 14:55:38 +0100 |
commit | 8205f170ff983e5240d32dc17d7fdb526ebe5fe7 (patch) | |
tree | 536acda827bcdd1a6668714855e6f6c3ba6b68d4 /searx/engines/command.py | |
parent | 707d6270c80426b54aeaa0ac0acd80ded45df533 (diff) | |
download | searxng-8205f170ff983e5240d32dc17d7fdb526ebe5fe7.tar.gz searxng-8205f170ff983e5240d32dc17d7fdb526ebe5fe7.zip |
[mod] pylint all engines without PYLINT_SEARXNG_DISABLE_OPTION
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/engines/command.py')
-rw-r--r-- | searx/engines/command.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/searx/engines/command.py b/searx/engines/command.py index ffb87509a..176388e3a 100644 --- a/searx/engines/command.py +++ b/searx/engines/command.py @@ -106,7 +106,7 @@ def init(engine_settings): if 'command' not in engine_settings: raise ValueError('engine command : missing configuration key: command') - global command, working_dir, delimiter, parse_regex, environment_variables + global command, working_dir, delimiter, parse_regex, environment_variables # pylint: disable=global-statement command = engine_settings['command'] @@ -172,7 +172,7 @@ def _get_results_from_process(results, cmd, pageno): _command_logger.debug('skipped result:', raw_result) continue - if start <= count and count <= end: + if start <= count and count <= end: # pylint: disable=chained-comparison result['template'] = result_template results.append(result) @@ -185,6 +185,7 @@ def _get_results_from_process(results, cmd, pageno): return_code = process.wait(timeout=timeout) if return_code != 0: raise RuntimeError('non-zero return code when running command', cmd, return_code) + return None def __get_results_limits(pageno): @@ -230,7 +231,7 @@ def __parse_single_result(raw_result): elements = raw_result.split(delimiter['chars'], maxsplit=len(delimiter['keys']) - 1) if len(elements) != len(delimiter['keys']): return {} - for i in range(len(elements)): + for i in range(len(elements)): # pylint: disable=consider-using-enumerate result[delimiter['keys'][i]] = elements[i] if parse_regex: |