diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2013-03-27 15:49:58 -0400 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2013-05-07 13:48:48 -0400 |
commit | af0158ebabd6e2ceca4e33a9ab8d391025936dd1 (patch) | |
tree | 1baabb1b8cbe79dd2e0ebd5c07c319b9aa35adc4 | |
parent | a1a513a7a6adc7685a88be910efc92dd81fa21c0 (diff) | |
download | gobject-introspection-af0158ebabd6e2ceca4e33a9ab8d391025936dd1.tar.gz |
sectionparser: Allow subsections with no name
https://bugzilla.gnome.org/show_bug.cgi?id=699856
-rw-r--r-- | giscanner/sectionparser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/giscanner/sectionparser.py b/giscanner/sectionparser.py index 273cdebe..f66d46ac 100644 --- a/giscanner/sectionparser.py +++ b/giscanner/sectionparser.py @@ -66,9 +66,9 @@ def parse_sections_file(lines): current_section.title = match.groupdict['contents'] continue - match = re.match(r"<SUBSECTION (?P<name>.*)>", line) + match = re.match(r"<SUBSECTION(?: (?P<name>.*))?>", line) if match: - current_subsection = Subsection(match.groupdict['name']) + current_subsection = Subsection(match.groupdict.get('name', None)) current_section.subsections.append(current_subsection) continue |