diff options
| author | Noémi Ványi <kvch@users.noreply.github.com> | 2020-09-12 14:51:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-12 14:51:35 +0200 |
| commit | 2370234d0978f59dd62efa4a4931e41ad31444d1 (patch) | |
| tree | d3863e22b3d34092484146ce0bdc6e0ca8d36216 /searx/answerers/__init__.py | |
| parent | 272158944bf13503e2597018fc60a00baddec660 (diff) | |
| parent | bdac99d4f0349a71d7ecb9a4c61687356afedd6b (diff) | |
Merge pull request #2137 from dalf/drop-python-2
Drop Python 2
Diffstat (limited to 'searx/answerers/__init__.py')
| -rw-r--r-- | searx/answerers/__init__.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/searx/answerers/__init__.py b/searx/answerers/__init__.py index 444316f11..97e7e5854 100644 --- a/searx/answerers/__init__.py +++ b/searx/answerers/__init__.py @@ -1,12 +1,8 @@ from os import listdir from os.path import realpath, dirname, join, isdir -from sys import version_info from searx.utils import load_module from collections import defaultdict -if version_info[0] == 3: - unicode = str - answerers_dir = dirname(realpath(__file__)) @@ -36,10 +32,10 @@ def ask(query): results = [] query_parts = list(filter(None, query.query.split())) - if query_parts[0].decode('utf-8') 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('utf-8')]: + for answerer in answerers_by_keywords[query_parts[0]]: result = answerer(query) if result: results.append(result) |