diff options
author | Dalf <alex@al-f.net> | 2020-08-11 16:25:03 +0200 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2020-09-10 10:49:42 +0200 |
commit | c225db45c8a4ab466bff049216f7e0189dc1b067 (patch) | |
tree | 16be3299a6faf15538fc1f2cf181aadc422039fd /searx/answerers/__init__.py | |
parent | 78883777438fc07833d983c50d9b131eb6feb9eb (diff) | |
download | searxng-c225db45c8a4ab466bff049216f7e0189dc1b067.tar.gz searxng-c225db45c8a4ab466bff049216f7e0189dc1b067.zip |
Drop Python 2 (4/n): SearchQuery.query is a str instead of bytes
Diffstat (limited to 'searx/answerers/__init__.py')
-rw-r--r-- | searx/answerers/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/answerers/__init__.py b/searx/answerers/__init__.py index 47cc33ed3..97e7e5854 100644 --- a/searx/answerers/__init__.py +++ b/searx/answerers/__init__.py @@ -32,10 +32,10 @@ def ask(query): results = [] query_parts = list(filter(None, query.query.split())) - if query_parts[0].decode() not in answerers_by_keywords: + if query_parts[0] not in answerers_by_keywords: return results - for answerer in answerers_by_keywords[query_parts[0].decode()]: + for answerer in answerers_by_keywords[query_parts[0]]: result = answerer(query) if result: results.append(result) |