From 29269c7c514e78a26aee3d6f7e6bd7381ffa0dcb Mon Sep 17 00:00:00 2001 From: mutantmonkey Date: Thu, 11 Apr 2013 18:03:41 -0400 Subject: [PATCH] foodforus: display errors --- modules/foodforus.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/foodforus.py b/modules/foodforus.py index 2cfbb4b..5a4487a 100644 --- a/modules/foodforus.py +++ b/modules/foodforus.py @@ -70,7 +70,10 @@ def foodvote(phenny, input): raise GrumbleError("Uh oh, I couldn't contact foodforus. HOW WILL WE "\ "EAT NOW‽") - phenny.reply("Your vote has been recorded.") + if 'error' in data: + phenny.reply(data['error']) + else: + phenny.reply("Your vote has been recorded.") foodvote.rule = (['foodvote'], r'(.*) (\d{2}:\d{2})( .*)?')