Skip to content

Commit

Permalink
[bugfix] Minor Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JayYip committed May 27, 2019
1 parent 603595e commit f68e926
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docproduct/predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def predict(self, questions, search_by='answer', topk=5, answer_only=False):
result_list = [s for s in result_list if s]
try:
r = result_list[0].group(1)
except AttributeError:
except (AttributeError, IndexError):
r = ''
return r

Expand Down

0 comments on commit f68e926

Please sign in to comment.