mirror of
https://github.com/searxng/searxng
synced 2024-01-01 18:24:07 +00:00
Fix type of unresponsive_engines
Previously __get_translated_errors returned a list. But unresponsive_engines is a set. Closes #2305
This commit is contained in:
parent
963b93b543
commit
80a8bc5ad9
@ -735,12 +735,12 @@ def search():
|
|||||||
|
|
||||||
|
|
||||||
def __get_translated_errors(unresponsive_engines):
|
def __get_translated_errors(unresponsive_engines):
|
||||||
translated_errors = []
|
translated_errors = set()
|
||||||
for unresponsive_engine in unresponsive_engines:
|
for unresponsive_engine in unresponsive_engines:
|
||||||
error_msg = gettext(unresponsive_engine[1])
|
error_msg = gettext(unresponsive_engine[1])
|
||||||
if unresponsive_engine[2]:
|
if unresponsive_engine[2]:
|
||||||
error_msg = "{} {}".format(error_msg, unresponsive_engine[2])
|
error_msg = "{} {}".format(error_msg, unresponsive_engine[2])
|
||||||
translated_errors.append((unresponsive_engine[0], error_msg))
|
translated_errors.add((unresponsive_engine[0], error_msg))
|
||||||
return translated_errors
|
return translated_errors
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user