From 7c68b2cb536c7c2a6cf013f54318592c5a7f0ea1 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Fri, 28 May 2021 17:56:59 +0200 Subject: [PATCH] RSS: Fix crash in @rss list --- plugins/RSS/plugin.py | 4 ++-- plugins/RSS/test.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/RSS/plugin.py b/plugins/RSS/plugin.py index 56281c2d8..937e97a4e 100644 --- a/plugins/RSS/plugin.py +++ b/plugins/RSS/plugin.py @@ -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',]) diff --git a/plugins/RSS/test.py b/plugins/RSS/test.py index a40b49d93..eab10c61b 100644 --- a/plugins/RSS/test.py +++ b/plugins/RSS/test.py @@ -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')