aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2018-12-16 11:03:36 +0000
committerGravatar jesopo2018-12-16 11:03:36 +0000
commit28900c2ff924bbbd993ffd774894f5b2385634f4 (patch)
tree536b0e09eb138e6c1fd0061012f8d9e3995a372e /modules
parentChannels are 'target' in command events (diff)
signature
Correctly handle a 404 in thesaurus.py
Diffstat (limited to 'modules')
-rw-r--r--modules/thesaurus.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/thesaurus.py b/modules/thesaurus.py
index ac58be8c..288c6ab9 100644
--- a/modules/thesaurus.py
+++ b/modules/thesaurus.py
@@ -16,6 +16,9 @@ class Module(ModuleManager.BaseModule):
"bighugethesaurus-api-key"], phrase), json=True)
syn_ant = event["command"][:3]
if page:
+ if page.code == 404:
+ raise utils.EventError("Word not found")
+
if not len(event["args_split"]) > 1:
word_types = []
for word_type in page.data.keys():