mirror of
https://github.com/jlu5/SupyPlugins.git
synced 2025-05-02 00:11:06 -05:00
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)
This commit is contained in:
parent
db01a84fe9
commit
3dbff43274
@ -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 = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user