[fix] dict keys

This commit is contained in:
asciimoo 2013-10-18 08:24:58 +02:00
parent ec39c0ed2c
commit 90cec08e25

View file

@ -94,7 +94,7 @@ def search(query, request, selected_engines):
duplicated = new_res
break
if duplicated:
if len(res['content']) > len(duplicated):
if len(res.get('content', '')) > len(duplicated.get('content', '')):
duplicated['content'] = res['content']
duplicated['score'] += score
else: