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:
Noémi Ványi 2020-11-17 23:22:45 +01:00
parent 963b93b543
commit 80a8bc5ad9
1 changed files with 2 additions and 2 deletions

View File

@ -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