RSS: Fix crash in @rss list

This commit is contained in:
Valentin Lorentz 2021-05-28 17:56:59 +02:00
parent 86b1741fdd
commit 7c68b2cb53
2 changed files with 4 additions and 2 deletions

View File

@ -546,8 +546,8 @@ class RSS(callbacks.Plugin):
only necessary if the message isn't sent in the channel itself.
"""
announce = conf.supybot.plugins.RSS.announce
channel_feeds = announce.getSpecific(channel=channel) \
| announce.getSpecific(channel=channel, network=irc.network)
channel_feeds = announce.getSpecific(channel=channel)() \
| announce.getSpecific(channel=channel, network=irc.network)()
feeds = format('%L', set(channel_feeds)) # set() to deduplicate
irc.reply(feeds or _('I am currently not announcing any feeds.'))
list = wrap(list, ['channel',])

View File

@ -214,6 +214,7 @@ class RSSTestCase(ChannelPluginTestCase):
self.assertRegexp(' ', 'Telescopes')
self.assertRegexp(' ', 'Chaos')
self.assertNoResponse(' ', timeout=0.1)
self.assertResponse('announce list', 'http://xkcd.com/rss.xml')
finally:
self._feedMsg('rss announce 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)
timeFastForward(1.1)
self.assertNoResponse(' ', timeout=0.1)
self.assertResponse('announce list', 'xkcd')
finally:
self._feedMsg('rss announce remove xkcd')
self._feedMsg('rss remove xkcd')