diff --git a/feedgen/entry.py b/feedgen/entry.py index d1286c1..ef5dee3 100644 --- a/feedgen/entry.py +++ b/feedgen/entry.py @@ -90,8 +90,8 @@ class FeedEntry(object): email = etree.SubElement(author, 'email') email.text = a.get('email') if a.get('uri'): - email = etree.SubElement(author, 'url') - email.text = a.get('uri') + uri = etree.SubElement(author, 'uri') + uri.text = a.get('uri') if self.__atom_content: content = etree.SubElement(entry, 'content') @@ -156,8 +156,8 @@ class FeedEntry(object): email = etree.SubElement(contrib, 'email') email.text = c.get('email') if c.get('uri'): - email = etree.SubElement(contrib, 'url') - email.text = c.get('uri') + uri = etree.SubElement(contrib, 'uri') + uri.text = c.get('uri') if self.__atom_published: published = etree.SubElement(entry, 'published') diff --git a/feedgen/feed.py b/feedgen/feed.py index 18b5b18..58f1847 100644 --- a/feedgen/feed.py +++ b/feedgen/feed.py @@ -47,7 +47,7 @@ class FeedGenerator(object): self.__atom_contributor = None self.__atom_generator = { 'value' :'python-feedgen', - 'url' :'http://lkiesow.github.io/python-feedgen', + 'uri' :'http://lkiesow.github.io/python-feedgen', 'version':feedgen.version.version_str } #{value*,uri,version} self.__atom_icon = None self.__atom_logo = None @@ -124,8 +124,8 @@ class FeedGenerator(object): email = etree.SubElement(author, 'email') email.text = a.get('email') if a.get('uri'): - email = etree.SubElement(author, 'url') - email.text = a.get('uri') + uri = etree.SubElement(author, 'uri') + uri.text = a.get('uri') for l in self.__atom_link or []: link = etree.SubElement(feed, 'link', href=l['href']) @@ -159,8 +159,8 @@ class FeedGenerator(object): email = etree.SubElement(contrib, 'email') email.text = c.get('email') if c.get('uri'): - email = etree.SubElement(contrib, 'url') - email.text = c.get('uri') + uri = etree.SubElement(contrib, 'uri') + uri.text = c.get('uri') if self.__atom_generator: generator = etree.SubElement(feed, 'generator') diff --git a/tests/test_feed.py b/tests/test_feed.py index 7c70760..8d18e3b 100644 --- a/tests/test_feed.py +++ b/tests/test_feed.py @@ -215,7 +215,7 @@ class TestSequenceFunctions(unittest.TestCase): assert feed.find("{%s}subtitle" % nsAtom).text == self.subtitle assert feed.find("{%s}contributor" % nsAtom).find("{%s}name" % nsAtom).text == self.contributor['name'] assert feed.find("{%s}contributor" % nsAtom).find("{%s}email" % nsAtom).text == self.contributor['email'] - assert feed.find("{%s}contributor" % nsAtom).find("{%s}url" % nsAtom).text == self.contributor['uri'] + assert feed.find("{%s}contributor" % nsAtom).find("{%s}uri" % nsAtom).text == self.contributor['uri'] assert feed.find("{%s}rights" % nsAtom).text == self.copyright def test_rssFeedFile(self):