Skip to content

Commit

Permalink
handled multiple returns
Browse files Browse the repository at this point in the history
  • Loading branch information
aman-tiwari committed Dec 21, 2015
1 parent 62d241b commit 8dc6984
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion obituarybot.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def get_poem(names):
for name in names:
try:
text = w.page(name).content
except w.exceptions.PageError:
except (w.exceptions.PageError, w.exceptions.DisambiguationError):
continue
raw_sentences = nltk.sent_tokenize(text)
sentences = preprocess_sentences(raw_sentences)
Expand Down

0 comments on commit 8dc6984

Please sign in to comment.