Skip to content

Commit

Permalink
Fix for phony getiterator() on lxml node.
Browse files Browse the repository at this point in the history
  • Loading branch information
gryf committed Jun 24, 2021
1 parent 0a9536b commit ecacc8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ebook_converter/ebooks/lrf/pylrs/pylrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def _checkExists(filename):

def _formatXml(root):
""" A helper to make the LRS output look nicer. """
for elem in root.getiterator():
for elem in root:
if len(elem) > 0 and (not elem.text or not elem.text.strip()):
elem.text = "\n"
if not elem.tail or not elem.tail.strip():
Expand Down

0 comments on commit ecacc8a

Please sign in to comment.