oh my god, the cronny pain
[planet-ucc.git] / update-planet
index 09c40b0..c4477ff 100755 (executable)
@@ -38,9 +38,7 @@ for feed in feeds:
                blog.feedURL    = feed[1]
                blogs.append(blog)
                # check the old copy of the cache, vs the new copy
-               if feed[2].cache == blog.cache:
-                       pass
-               else:
+               if not feed[2] or not feed[2].cache or not blog or not blog.cache or feed[2].cache != blog.cache:
                        tainted = True
                # write the cache back down to disk
                cache.storeBlog(blog)
@@ -48,7 +46,7 @@ for feed in feeds:
                pass
 
 if not tainted:
-       sys.stderr.write('PlanetUCC: no objects have changed in the cache, not updating\n')
+       sys.stdout.write('PlanetUCC: no objects have changed in the cache, not updating\n')
        sys.exit(1)
 
 # step 3: sift the feeds

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