mirror of https://github.com/searx/searx
Merge pull request #2323 from kvch/fix-unresponsive-engine-set-modified
Fix RuntimeError during search with translated errors
This commit is contained in:
commit
2fc3b17c85
|
@ -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