summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xwikiquery5
1 files changed, 4 insertions, 1 deletions
diff --git a/wikiquery b/wikiquery
index edf47cc..7682d78 100755
--- a/wikiquery
+++ b/wikiquery
@@ -47,7 +47,10 @@ def main():
page = wikipedia.page(topic)
display(page.url)
else:
- display(wikipedia.summary(topic))
+ try:
+ display(wikipedia.summary(topic))
+ except wikipedia.exceptions.DisambiguationError as e:
+ display(e.options)
if __name__ == "__main__":
main()