From 28900c2ff924bbbd993ffd774894f5b2385634f4 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 16 Dec 2018 11:03:36 +0000 Subject: [PATCH] Correctly handle a 404 in thesaurus.py --- modules/thesaurus.py | 3 +++ 1 file changed, 3 insertions(+) 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():