Fix an exception in RSS.announce.

This commit is contained in:
James Vega 2005-02-22 14:27:59 +00:00
parent 9f6fcf260f
commit 3f94bf6dae
2 changed files with 6 additions and 1 deletions

View File

@ -318,7 +318,7 @@ class RSS(callbacks.Plugin):
announce.get(channel).setValue(feeds) announce.get(channel).setValue(feeds)
irc.replySuccess() irc.replySuccess()
elif not rest: elif not rest:
feeds = format('%L', announce.get(channel)()) feeds = format('%L', list(announce.get(channel)()))
irc.reply(feeds or 'I am currently not announcing any feeds.') irc.reply(feeds or 'I am currently not announcing any feeds.')
return return
announce = wrap(announce, [('checkChannelCapability', 'op'), announce = wrap(announce, [('checkChannelCapability', 'op'),

View File

@ -56,6 +56,11 @@ class RSSTestCase(ChannelPluginTestCase):
self.assertNotRegexp('rss info http://slashdot.org/slashdot.rss', self.assertNotRegexp('rss info http://slashdot.org/slashdot.rss',
'-1 years') '-1 years')
def testAnnounce(self):
self.assertNotError('rss add advogato %s' % url)
self.assertNotError('rss announce advogato')
self.assertNotRegexp('rss announce', r'ValueError')
def testRss(self): def testRss(self):
self.assertNotError('rss %s' % url) self.assertNotError('rss %s' % url)
m = self.assertNotError('rss %s 2' % url) m = self.assertNotError('rss %s 2' % url)