mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
compat with newer lxml
This commit is contained in:
parent
12e4912865
commit
9120d3116a
@ -72,7 +72,7 @@ def _checkExists(filename):
|
|||||||
|
|
||||||
def _formatXml(root):
|
def _formatXml(root):
|
||||||
""" A helper to make the LRS output look nicer. """
|
""" A helper to make the LRS output look nicer. """
|
||||||
for elem in root.getiterator():
|
for elem in root.iter():
|
||||||
if len(elem) > 0 and (not elem.text or not elem.text.strip()):
|
if len(elem) > 0 and (not elem.text or not elem.text.strip()):
|
||||||
elem.text = "\n"
|
elem.text = "\n"
|
||||||
if not elem.tail or not elem.tail.strip():
|
if not elem.tail or not elem.tail.strip():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user