CacheHandler fixes
authordavyd <davyd>
Thu, 12 Feb 2004 04:39:10 +0000 (04:39 +0000)
committerdavyd <davyd>
Thu, 12 Feb 2004 04:39:10 +0000 (04:39 +0000)
XMLParse2.py

index 8f6dc7e..563a0fa 100644 (file)
@@ -61,10 +61,17 @@ class XMLParse:
                # create caching data
                try:
                        cache           = CacheHandler.CacheObject()
-                       cache.etag      = data['etag']
-                       cache.date      = data['modified']
+                       try:
+                               cache.etag      = data['etag']
+                       except:
+                               cache.etag      = None
+                       try:
+                               cache.date      = data['modified']
+                       except:
+                               cache.date      = None
                        item.cache      = cache
                except:
+                       sys.stderr.write('DEBUG: XMLParse2: cache item generation failed\n')
                        item.cache      = None
                # parse the return of data into a blog
                if data['channel'].has_key('title'):

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