diff options
author | Johan Dahlin <jdahlin@litl.com> | 2009-02-26 13:21:40 (GMT) |
---|---|---|
committer | Johan Dahlin <johan@gnome.org> | 2009-02-26 14:31:41 (GMT) |
commit | 7b62eef116bec87fbd2c3ea13af95fcfc2e05cfd (patch) | |
tree | bcb8fc7366c816e499570aee8345530eda7c9b4e | |
parent | 251de52b083d3e0e42f25cb164a46865c2c2b9a9 (diff) |
Don't assume _pkgconfig_packages is set.
This fixes a cache issue where the pickle in the cache doesn't
have self._pkgconfig_packages set in its instance
-rw-r--r-- | giscanner/girparser.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/giscanner/girparser.py b/giscanner/girparser.py index 62db3e9..1db5c6e 100644 --- a/giscanner/girparser.py +++ b/giscanner/girparser.py @@ -76,6 +76,8 @@ class GIRParser(object): return self._includes def get_pkgconfig_packages(self): + if not hasattr(self, '_pkgconfig_packages'): + self._pkgconfig_packages = [] return self._pkgconfig_packages def get_doc(self): @@ -130,6 +132,8 @@ class GIRParser(object): self._includes.add(include) def _parse_pkgconfig_package(self, node): + if not hasattr(self, '_pkgconfig_packages'): + self._pkgconfig_packages = [] self._pkgconfig_packages.add(node.attrib['name']) def _parse_alias(self, node): |