From 9a5acad5f023026c68ec7f1400e1d04046e82afb Mon Sep 17 00:00:00 2001 From: mutantmonkey Date: Mon, 26 Dec 2011 22:20:59 -0500 Subject: [PATCH] urbandict: terminate if no definition found --- modules/urbandict.py | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/urbandict.py b/modules/urbandict.py index e823b51..d70889e 100644 --- a/modules/urbandict.py +++ b/modules/urbandict.py @@ -26,6 +26,7 @@ def urbandict(phenny, input): if data['result_type'] == 'no_results': phenny.say("No results found for {0}".format(word)) + return result = data['list'][0] url = 'http://www.urbandictionary.com/define.php?term={0}'.format(urlquote(word))