Drop Python 2 (4/n): SearchQuery.query is a str instead of bytes

This commit is contained in:
Dalf
2020-08-11 16:25:03 +02:00
committed by Alexandre Flament
parent 7888377743
commit c225db45c8
20 changed files with 48 additions and 48 deletions

View File

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