mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 19:22:45 +01:00
Only reset the cached feed when the response actually contains headlines
Some feeds, such as those from sourceforge.net, will sometimes show an error page rather than a feed. In this case the feed cache used to be cleared for that feed, causing all 'old' headlines to be flooded to the channel as soon as the feed came back online. This patch hopefully fixes that by only resetting the cache when the returned page actually contains headlines. Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
This commit is contained in:
parent
333067c151
commit
58e7e61d69
@ -236,7 +236,7 @@ class RSS(callbacks.Plugin):
|
||||
# These seem mostly harmless. We'll need reports of a
|
||||
# kind that isn't.
|
||||
self.log.debug('Allowing bozo_exception %r through.', e)
|
||||
if results.get('feed', {}):
|
||||
if results.get('feed', {}) and self.getHeadlines(results):
|
||||
self.cachedFeeds[url] = results
|
||||
self.lastRequest[url] = time.time()
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user