From 7b62eef116bec87fbd2c3ea13af95fcfc2e05cfd Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Thu, 26 Feb 2009 10:21:40 -0300 Subject: 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 --- giscanner/girparser.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'giscanner/girparser.py') diff --git a/giscanner/girparser.py b/giscanner/girparser.py index 62db3e98..1db5c6e4 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): -- cgit v1.2.1