mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-17 06:00:42 +01:00
RSS: Fix crash in @rss list
This commit is contained in:
parent
86b1741fdd
commit
7c68b2cb53
@ -546,8 +546,8 @@ class RSS(callbacks.Plugin):
|
|||||||
only necessary if the message isn't sent in the channel itself.
|
only necessary if the message isn't sent in the channel itself.
|
||||||
"""
|
"""
|
||||||
announce = conf.supybot.plugins.RSS.announce
|
announce = conf.supybot.plugins.RSS.announce
|
||||||
channel_feeds = announce.getSpecific(channel=channel) \
|
channel_feeds = announce.getSpecific(channel=channel)() \
|
||||||
| announce.getSpecific(channel=channel, network=irc.network)
|
| announce.getSpecific(channel=channel, network=irc.network)()
|
||||||
feeds = format('%L', set(channel_feeds)) # set() to deduplicate
|
feeds = format('%L', set(channel_feeds)) # set() to deduplicate
|
||||||
irc.reply(feeds or _('I am currently not announcing any feeds.'))
|
irc.reply(feeds or _('I am currently not announcing any feeds.'))
|
||||||
list = wrap(list, ['channel',])
|
list = wrap(list, ['channel',])
|
||||||
|
@ -214,6 +214,7 @@ class RSSTestCase(ChannelPluginTestCase):
|
|||||||
self.assertRegexp(' ', 'Telescopes')
|
self.assertRegexp(' ', 'Telescopes')
|
||||||
self.assertRegexp(' ', 'Chaos')
|
self.assertRegexp(' ', 'Chaos')
|
||||||
self.assertNoResponse(' ', timeout=0.1)
|
self.assertNoResponse(' ', timeout=0.1)
|
||||||
|
self.assertResponse('announce list', 'http://xkcd.com/rss.xml')
|
||||||
finally:
|
finally:
|
||||||
self._feedMsg('rss announce remove http://xkcd.com/rss.xml')
|
self._feedMsg('rss announce remove http://xkcd.com/rss.xml')
|
||||||
self._feedMsg('rss remove http://xkcd.com/rss.xml')
|
self._feedMsg('rss remove http://xkcd.com/rss.xml')
|
||||||
@ -231,6 +232,7 @@ class RSSTestCase(ChannelPluginTestCase):
|
|||||||
self.assertNoResponse(' ', timeout=0.1)
|
self.assertNoResponse(' ', timeout=0.1)
|
||||||
timeFastForward(1.1)
|
timeFastForward(1.1)
|
||||||
self.assertNoResponse(' ', timeout=0.1)
|
self.assertNoResponse(' ', timeout=0.1)
|
||||||
|
self.assertResponse('announce list', 'xkcd')
|
||||||
finally:
|
finally:
|
||||||
self._feedMsg('rss announce remove xkcd')
|
self._feedMsg('rss announce remove xkcd')
|
||||||
self._feedMsg('rss remove xkcd')
|
self._feedMsg('rss remove xkcd')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user