From 0508681eeee63d97d6af139429ad223758c2d72d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Thu, 29 Sep 2011 09:05:21 +0200 Subject: [PATCH] mallard: Ignore sections without title --- src/modtypes/mallard.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modtypes/mallard.py b/src/modtypes/mallard.py index 76b13f2..1b23fb0 100644 --- a/src/modtypes/mallard.py +++ b/src/modtypes/mallard.py @@ -77,6 +77,8 @@ class MallardPage: self.sort_title.attrib['type'] = 'sort' for section in tree.findall('{%s}section' % MAL_NS): title_tag = section.find('{%s}title' % MAL_NS) + if title_tag is None: + continue if not section.attrib.get('id'): continue self.sections.append({'id': section.attrib['id'],