DEBUG fixes
authordavyd <davyd>
Sun, 15 Feb 2004 04:49:19 +0000 (04:49 +0000)
committerdavyd <davyd>
Sun, 15 Feb 2004 04:49:19 +0000 (04:49 +0000)
Changelog
update-planet

index 2a3f327..6279c4a 100644 (file)
--- 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.
index 6122579..b532165 100755 (executable)
@@ -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:

UCC git Repository :: git.ucc.asn.au