[library-web] mallard: Ignore sections without title



commit 0508681eeee63d97d6af139429ad223758c2d72d
Author: FrÃdÃric PÃters <fpeters 0d be>
Date:   Thu Sep 29 09:05:21 2011 +0200

    mallard: Ignore sections without title

 src/modtypes/mallard.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
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'],



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]