summaryrefslogtreecommitdiff
path: root/giscanner/girparser.py
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2008-11-01 23:01:21 +0000
committerOwen Taylor <otaylor@src.gnome.org>2008-11-01 23:01:21 +0000
commitdc3ee1d2705415a6ab8df5b89a11008b11bcfbbf (patch)
tree87d6aadbfbb3a5e507874047c6d42a95abfa6b12 /giscanner/girparser.py
parent9cb013f03e6272381ff1ddd2e476e7a6ed8b9a09 (diff)
downloadgobject-introspection-dc3ee1d2705415a6ab8df5b89a11008b11bcfbbf.tar.gz
Bug 558848 giparser.py: shared library should be optional
2008-11-01 Owen Taylor <otaylor@redhat.com> Bug 558848 giparser.py: shared library should be optional When parsing a .gir, allow the shared-library attribute of <namespace/> to be missing: this corresponds to the handling in libgirepository and elsewhere. svn path=/trunk/; revision=860
Diffstat (limited to 'giscanner/girparser.py')
-rw-r--r--giscanner/girparser.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/giscanner/girparser.py b/giscanner/girparser.py
index 8b255a43..0c897a53 100644
--- a/giscanner/girparser.py
+++ b/giscanner/girparser.py
@@ -94,8 +94,9 @@ class GIRParser(object):
assert ns is not None
self._namespace = Namespace(ns.attrib['name'],
ns.attrib['version'])
- self._shared_libraries.extend(
- ns.attrib['shared-library'].split(','))
+ if 'shared-library' in ns.attrib:
+ self._shared_libraries.extend(
+ ns.attrib['shared-library'].split(','))
parser_methods = {
_corens('alias'): self._parse_alias,