From 3dbff43274b033ebac7bda1672fb6c73dd94eb14 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sun, 28 Jan 2018 14:25:26 -0800 Subject: [PATCH] Weather: remove try/except on getUrl in _wuac() irc isn't defined in this scope, so this would throw errors trying to raise an error (cherry picked from commit 84e376acf5a51a5a6c1191cd44a06a29db3cd865) --- Weather/plugin.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Weather/plugin.py b/Weather/plugin.py index 06c2818..96490f0 100644 --- a/Weather/plugin.py +++ b/Weather/plugin.py @@ -306,10 +306,7 @@ class Weather(callbacks.Plugin): url = 'http://autocomplete.wunderground.com/aq?query=%s' % utils.web.urlquote(q) self.log.debug("Weather: Autocomplete URL: %s", url) - try: - page = utils.web.getUrl(url, timeout=5) - except utils.web.Error as e: - irc.error("Failed to load location data for %r." % q, Raise=True) + page = utils.web.getUrl(url, timeout=5) data = json.loads(page.decode('utf-8')) results = []