make sure there is a content element before trying to access it
authorMoritz Venn <ritzmo@users.schwerkraft.elitedvb.net>
Wed, 30 Sep 2009 15:31:35 +0000 (15:31 +0000)
committerMoritz Venn <ritzmo@users.schwerkraft.elitedvb.net>
Wed, 30 Sep 2009 15:31:35 +0000 (15:31 +0000)
simplerss/src/RSSFeed.py

index c709a57..4544194 100644 (file)
@@ -65,7 +65,7 @@ class PEAEntryWrapper(ElementWrapper):
                        if not text:
                                # NOTE: if we don't have a summary we use the full content instead
                                elem = self._element.find(self._ns + 'content')
-                               if elem.get('type') == "html":
+                               if elem is not None and elem.get('type') == "html":
                                        text = elem.text
                        return text