diff --git a/src/calibre/ebooks/lrf/pylrs/pylrs.py b/src/calibre/ebooks/lrf/pylrs/pylrs.py index 3be64978a9..e5c78a2690 100644 --- a/src/calibre/ebooks/lrf/pylrs/pylrs.py +++ b/src/calibre/ebooks/lrf/pylrs/pylrs.py @@ -72,7 +72,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.iter(): 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():