X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/295a1350b069ee750d2f7430e779e5ac6f23a673..c7734daf3d6884c358f1644c1f8f7970453fafb1:/src/librarian/document.py?ds=sidebyside diff --git a/src/librarian/document.py b/src/librarian/document.py index d4063c5..6cdf191 100644 --- a/src/librarian/document.py +++ b/src/librarian/document.py @@ -101,7 +101,10 @@ class WLDocument: def _compat_assigns_section_ids_in_elem(elem, prefix='sec'): for i, child in enumerate(elem): idfier = '{}{}'.format(prefix, i + 1) - child.attrib['_compat_section_id'] = idfier + try: + child.attrib['_compat_section_id'] = idfier + except: + pass _compat_assigns_section_ids_in_elem(child, idfier + '-') _compat_assigns_section_ids_in_elem(self.tree.getroot().master)