mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 04:39:26 +01:00
RSS: include channel name in 'feed is announced but does not exist' error log.
This commit is contained in:
parent
4bd5d8eb33
commit
c04b31ae32
@ -338,15 +338,21 @@ class RSS(callbacks.Plugin):
|
||||
|
||||
@only_one_at_once
|
||||
def update_feeds(self):
|
||||
announced_feeds = set()
|
||||
announced_feeds = {}
|
||||
for irc in world.ircs:
|
||||
for channel in irc.state.channels:
|
||||
announced_feeds |= self.registryValue('announce', channel, irc.network)
|
||||
for name in announced_feeds:
|
||||
channel_feed_names = self.registryValue(
|
||||
'announce', channel, irc.network)
|
||||
for name in channel_feed_names:
|
||||
announced_feeds[name] = (channel, irc.network)
|
||||
for (name, (channel, network)) in announced_feeds.items():
|
||||
feed = self.get_feed(name)
|
||||
if not feed:
|
||||
self.log.warning('Feed %s is announced but does not exist.',
|
||||
name)
|
||||
self.log.warning(
|
||||
'Feed %s is announced in %s@%s, but does not exist. '
|
||||
'Use "rss announce remove %s %s" to remove it from '
|
||||
'announcements.',
|
||||
name, channel, network, channel, name)
|
||||
continue
|
||||
self.update_feed_if_needed(feed)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user