From 482161e98b254c4d67a81def8c726dad7bf03af8 Mon Sep 17 00:00:00 2001 From: Steve Vaught Date: Tue, 19 Apr 2011 00:50:58 -0400 Subject: Added error checking for empty parameters --- modules/wiktionary.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/wiktionary.py') diff --git a/modules/wiktionary.py b/modules/wiktionary.py index c8f665e..4a5f407 100755 --- a/modules/wiktionary.py +++ b/modules/wiktionary.py @@ -72,6 +72,8 @@ def format(word, definitions, number=2): return result.strip(' .,') def w(phenny, input): + if not input.group(2): + return phenny.reply("Nothing to define.") word = input.group(2) etymology, definitions = wiktionary(word) if not definitions: -- cgit v1.2.3-1-g7c22