From ac7a48602f8d793a9f1298423b66ca3630350ebd Mon Sep 17 00:00:00 2001 From: davyd Date: Sun, 15 Feb 2004 04:49:19 +0000 Subject: [PATCH] DEBUG fixes --- Changelog | 5 +++++ update-planet | 17 +++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Changelog b/Changelog index 2a3f327..6279c4a 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,8 @@ +2004-02-15 +========== + * update-planet + Fixed some random DEBUG messages. + 2004-02-14 ========== * Brought the Changelog up to date. diff --git a/update-planet b/update-planet index 6122579..b532165 100755 --- a/update-planet +++ b/update-planet @@ -20,21 +20,22 @@ for feed in open('feedlist').readlines(): name, feed = storage[0], storage[-1] try: feeds.append((name, feed, cache.getBlog(name, feed))) -# # XXX: might want to consider some good caching code in here -# feeds.append((name, feed, urllib2.urlopen(feed).read())) except: - raise + sys.stderr.write('DEBUG: update-planet: something went wrong retrieving feed\n') # step 2: process each feed blogs = [] for feed in feeds: # XMLParse2 takes two paramaters, a URL and a CacheObject blog = XMLParse.XMLParse(feed[1], feed[2]).parse() - blog.blogTitle = feed[0] - blog.feedURL = feed[1] - blogs.append(blog) - # write the cache back down to disk - cache.storeBlog(blog) + if blog: + blog.blogTitle = feed[0] + blog.feedURL = feed[1] + blogs.append(blog) + # write the cache back down to disk + cache.storeBlog(blog) + else: + pass # step 3: write feed to disk try: -- 2.20.1