mallard: Ignore sections without title

This commit is contained in:
Frédéric Péters 2011-09-29 09:05:21 +02:00
parent 52795316ca
commit 0508681eee
1 changed files with 2 additions and 0 deletions

View File

@ -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'],