1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-02-02 12:05:46 +01:00

Fix for phony getiterator() on lxml node.

This commit is contained in:
2021-06-24 20:36:36 +02:00
parent 0a9536b180
commit ecacc8a2a2

View File

@@ -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():