mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-30 22:24:20 +01:00
Make sure we reply if all of our fallbacks fail.
This commit is contained in:
parent
1e159fb386
commit
fda6b572a7
@ -134,6 +134,8 @@ class Weather(callbacks.Privmsg):
|
|||||||
break
|
break
|
||||||
except NoLocation:
|
except NoLocation:
|
||||||
self.log.info('%s lookup failed as backup.', command)
|
self.log.info('%s lookup failed as backup.', command)
|
||||||
|
irc.error('Could not retrieve weather for %s.' %
|
||||||
|
utils.quoted(location))
|
||||||
weather = wrap(weather, [additional('text')])
|
weather = wrap(weather, [additional('text')])
|
||||||
|
|
||||||
|
|
||||||
|
@ -71,6 +71,9 @@ if network:
|
|||||||
def testNoEscapingWebError(self):
|
def testNoEscapingWebError(self):
|
||||||
self.assertNotRegexp('ham "buenos aires"', 'WebError')
|
self.assertNotRegexp('ham "buenos aires"', 'WebError')
|
||||||
|
|
||||||
|
def testWeatherRepliesWithBogusLocation(self):
|
||||||
|
self.assertRegexp('weather some place that doesn\'t exist', r'.')
|
||||||
|
|
||||||
def testConvertConfig(self):
|
def testConvertConfig(self):
|
||||||
try:
|
try:
|
||||||
convert = conf.supybot.plugins.Weather.convert()
|
convert = conf.supybot.plugins.Weather.convert()
|
||||||
|
Loading…
Reference in New Issue
Block a user