Handle feed errors (no version string) better

This commit is contained in:
Sam Ruby 2006-10-17 20:59:06 -04:00
parent 045d38c418
commit e8e189c08f

View File

@ -186,6 +186,7 @@ def spiderFeed(feed):
data.feed['planet_http_last_modified'])
# capture feed and data from the planet configuration file
if data.version:
if not data.feed.has_key('links'): data.feed['links'] = list()
feedtype = 'application/atom+xml'
if data.version.startswith('rss'): feedtype = 'application/rss+xml'
@ -272,6 +273,8 @@ def spiderFeed(feed):
# report channel level errors
if data.status == 226:
if data.feed.has_key('planet_message'): del data.feed['planet_message']
if feed_info.feed.has_key('planet_updated'):
data.feed['planet_updated'] = feed_info.feed['planet_updated']
elif data.status == 403:
data.feed['planet_message'] = "403: forbidden"
elif data.status == 404: