From 550f0fb3de7a270c68fc3e1c00ed12ffea29a189 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Wed, 27 Aug 2003 22:30:48 +0000 Subject: [PATCH] Forgot return after irc.error and added test for non-existent location. --- plugins/Http.py | 3 ++- test/test_Http.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/Http.py b/plugins/Http.py index b3730ad4c..f93bd5eb6 100644 --- a/plugins/Http.py +++ b/plugins/Http.py @@ -304,6 +304,7 @@ class Http(callbacks.Privmsg): fd.close() if 'was not found' in html: irc.error(msg, 'No such location could be found.') + return headData = self._cityregex.search(html) if headData: (city, state, country) = headData.groups() @@ -324,7 +325,7 @@ class Http(callbacks.Privmsg): except urllib2.URLError: irc.error(msg, 'I couldn\'t open the search page.') except Exception, e: - debug.recoverableError() + debug.recoverableException() irc.error(msg, debug.exnToString(e)) _geekquotere = re.compile('

(.*?)

') diff --git a/test/test_Http.py b/test/test_Http.py index a4c4f1453..efb2f5019 100644 --- a/test/test_Http.py +++ b/test/test_Http.py @@ -78,7 +78,7 @@ class HttpTest(PluginTestCase): self.assertNotError('weather Columbus, OH') self.assertNotError('weather 43221') self.assertNotRegexp('weather Paris, FR', 'Virginia') - + self.assertError('weather alsdkfjasdl, asdlfkjsadlfkj') # vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: