After update to 0.9.0, generation of the Atom fails, if Summary is created via description. Here is minimal example:
from feedgen.feed import FeedGenerator
fg = FeedGenerator()
fg.id('http://lernfunk.de/media/654321')
fg.title('Some Testfeed')
fe = fg.add_entry()
fe.id('http://lernfunk.de/media/654321/1')
fe.title('The First Episode')
fe.link(href="http://lernfunk.de/feed")
fe.description("Some description", isSummary=True)
print(fg.atom_str(pretty=True).decode())
It fails with:
Traceback (most recent call last):
File "feedfail.py", line 21, in <module>
print(fg.atom_str(pretty=True).decode())
File "/usr/lib/python3/dist-packages/feedgen/feed.py", line 222, in atom_str
feed, doc = self._create_atom(extensions=extensions)
File "/usr/lib/python3/dist-packages/feedgen/feed.py", line 198, in _create_atom
entry = entry.atom_entry()
File "/usr/lib/python3/dist-packages/feedgen/entry.py", line 152, in atom_entry
_add_text_elm(entry, self.__atom_summary, 'summary')
File "/usr/lib/python3/dist-packages/feedgen/entry.py", line 29, in _add_text_elm
type_ = data.get('type')
AttributeError: 'str' object has no attribute 'get'
Adding as content (without isSummary=True) and adding it directly via summary method works as expected.
After update to 0.9.0, generation of the Atom fails, if Summary is created via description. Here is minimal example:
It fails with:
Adding as content (without isSummary=True) and adding it directly via summary method works as expected.