Skip to content

Commit

Permalink
Merge pull request #124 from chazeon/master
Browse files Browse the repository at this point in the history
Fix etree to string conversion in FeedGenerator
  • Loading branch information
lkiesow committed Dec 22, 2023
2 parents ee433b8 + 1e9282d commit 7a0c4d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions feedgen/feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def atom_str(self, pretty=False, extensions=True, encoding='UTF-8',
<https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.tostring>`_
'''
feed, doc = self._create_atom(extensions=extensions)
return etree.tostring(feed, pretty_print=pretty, encoding=encoding,
return etree.tostring(doc, pretty_print=pretty, encoding=encoding,
xml_declaration=xml_declaration)

def atom_file(self, filename, extensions=True, pretty=False,
Expand Down Expand Up @@ -396,7 +396,7 @@ def rss_str(self, pretty=False, extensions=True, encoding='UTF-8',
<https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.tostring>`_
'''
feed, doc = self._create_rss(extensions=extensions)
return etree.tostring(feed, pretty_print=pretty, encoding=encoding,
return etree.tostring(doc, pretty_print=pretty, encoding=encoding,
xml_declaration=xml_declaration)

def rss_file(self, filename, extensions=True, pretty=False,
Expand Down

0 comments on commit 7a0c4d7

Please sign in to comment.