From 9120d3116aeb46a933d776d5b7f64f4fc4150588 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 11 Dec 2020 09:05:09 +0530 Subject: [PATCH] compat with newer lxml --- src/calibre/ebooks/lrf/pylrs/pylrs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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():