From: Robert BÅ‚aut Date: Wed, 5 Mar 2014 13:38:44 +0000 (+0100) Subject: fix impovement for IT #3356 - workaround rare problem X-Git-Tag: 1.7~99^2~14 X-Git-Url: https://git.mdrn.pl/librarian.git/commitdiff_plain/5782cd6d2ee17eb613055e6b641f01dcd58af80e?ds=sidebyside fix impovement for IT #3356 - workaround rare problem --- diff --git a/librarian/epub.py b/librarian/epub.py index 8220ccb..8dba5ac 100644 --- a/librarian/epub.py +++ b/librarian/epub.py @@ -284,7 +284,10 @@ class TOC(object): nav_label = nav_map.makeelement(NCXNS('navLabel')) text = nav_map.makeelement(NCXNS('text')) - text.text = re.sub(r'\n', ' ', child.name) + if child.name is not None: + text.text = re.sub(r'\n', ' ', child.name) + else: + text.text = child.name nav_label.append(text) nav_point.append(nav_label)