From 80a8bc5ad99e1ea765d14cdc1916451a3a8ef2a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Tue, 17 Nov 2020 23:22:45 +0100 Subject: [PATCH] Fix type of unresponsive_engines Previously __get_translated_errors returned a list. But unresponsive_engines is a set. Closes #2305 --- searx/webapp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/searx/webapp.py b/searx/webapp.py index 65308275b..2a93c3765 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -735,12 +735,12 @@ def search(): def __get_translated_errors(unresponsive_engines): - translated_errors = [] + translated_errors = set() for unresponsive_engine in unresponsive_engines: error_msg = gettext(unresponsive_engine[1]) if 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