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
|
@only_one_at_once
|
||||||
def update_feeds(self):
|
def update_feeds(self):
|
||||||
announced_feeds = set()
|
announced_feeds = {}
|
||||||
for irc in world.ircs:
|
for irc in world.ircs:
|
||||||
for channel in irc.state.channels:
|
for channel in irc.state.channels:
|
||||||
announced_feeds |= self.registryValue('announce', channel, irc.network)
|
channel_feed_names = self.registryValue(
|
||||||
for name in announced_feeds:
|
'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)
|
feed = self.get_feed(name)
|
||||||
if not feed:
|
if not feed:
|
||||||
self.log.warning('Feed %s is announced but does not exist.',
|
self.log.warning(
|
||||||
name)
|
'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
|
continue
|
||||||
self.update_feed_if_needed(feed)
|
self.update_feed_if_needed(feed)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user