Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Be more resilient on HTTP errors

  • Loading branch information...
commit 33d3ad2a1af226a950838f76b97109febdce36b5 1 parent a767904
@rubys authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 planet/spider.py
View
4 planet/spider.py
@@ -125,7 +125,7 @@ def writeCache(feed_uri, feed_info, data):
log.info("Updating feed %s", feed_uri)
# if read failed, retain cached information
- if not data.version and feed_info.version:
+ if not data.has_key('version') and feed_info.has_key('version'):
data.feed = feed_info.feed
data.bozo = feed_info.feed.get('planet_bozo','true') == 'true'
data.version = feed_info.feed.get('planet_format')
@@ -147,7 +147,7 @@ def writeCache(feed_uri, feed_info, data):
data.feed['planet_content_hash'] = data.headers['-content-hash']
# capture feed and data from the planet configuration file
- if data.version:
+ if data.has_key('version') and 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'
Please sign in to comment.
Something went wrong with that request. Please try again.