comparison FeedUpdater.py @ 85:479e8c06de49

look at the bozo value of the result to determine if something went wrong with the HTTP call
author Dirk Olmes <dirk@xanthippe.ping.de>
date Thu, 09 Sep 2010 16:36:29 +0200
parents 97c4e94f99cf
children 99807963d9e0
comparison
equal deleted inserted replaced
84:bacf42da9e36 85:479e8c06de49
53 self.processEntry(entry) 53 self.processEntry(entry)
54 self.feed.incrementNextUpdateDate() 54 self.feed.incrementNextUpdateDate()
55 55
56 def getFeed(self): 56 def getFeed(self):
57 result = feedparser.parse(self.feed.rss_url) 57 result = feedparser.parse(self.feed.rss_url)
58 if result["bozo"] > 0:
59 raise FeedUpdateException()
58 if result["status"] >= STATUS_ERROR: 60 if result["status"] >= STATUS_ERROR:
59 raise FeedUpdateException() 61 raise FeedUpdateException()
60 return result 62 return result
61 63
62 def processEntry(self, entry): 64 def processEntry(self, entry):