RSS: Display nice error if an announced feed does not exist.

This commit is contained in:
Valentin Lorentz 2014-08-04 17:01:30 +02:00
parent 9385487f54
commit 8efcc4a009

View File

@ -273,7 +273,12 @@ class RSS(callbacks.Plugin):
for channel in irc.state.channels:
announced_feeds |= self.registryValue('announce', channel)
for name in announced_feeds:
self.update_feed_if_needed(self.get_feed(name))
feed = self.get_feed(name)
if not feed:
self.log.warning('Feed %s is announced but does not exist.' %
name)
continue
self.update_feed_if_needed(feed)
def get_new_entries(self, feed):
with feed.lock: