From ad8b31861aa95e38b48b02233954fa0e1b0e0fbf Mon Sep 17 00:00:00 2001 From: Sam Ruby Date: Sun, 13 Jun 2010 12:31:08 -0400 Subject: [PATCH] Don't blow up on feeds which contain images inside rss items. Example: http://www.thestranger.com/seattle/Rss.xml?category=oid%3A258 --- planet/vendor/feedparser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planet/vendor/feedparser.py b/planet/vendor/feedparser.py index 83e1c95..8e18838 100755 --- a/planet/vendor/feedparser.py +++ b/planet/vendor/feedparser.py @@ -1131,7 +1131,7 @@ class _FeedParserMixin: def _getContext(self): if self.insource: context = self.sourcedata - elif self.inimage: + elif self.inimage and self.feeddata.has_key('image'): context = self.feeddata['image'] elif self.intextinput: context = self.feeddata['textinput']