Fixed <published> attribute in Atom feed entries

This commit is contained in:
Lars Kiesow 2013-09-28 01:19:04 +02:00
parent 8b18122cfd
commit 6b2a2a5232

View file

@ -36,6 +36,7 @@ class FeedEntry(object):
# optional
self.__atom_category = None
self.__atom_contributor = None
self.__atom_published = None
self.__atom_source = None
self.__atom_rights = None
@ -157,6 +158,10 @@ class FeedEntry(object):
email = etree.SubElement(contrib, 'url')
email.text = c.get('uri')
if self.__atom_published:
published = etree.SubElement(entry, 'published')
published.text = self.__atom_published.isoformat()
if self.__atom_rights:
rights = etree.SubElement(feed, 'rights')
rights.text = self.__atom_rights