summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/packages.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/spack/spack/packages.py b/lib/spack/spack/packages.py
index 7ef8135c1a..3c81863c11 100644
--- a/lib/spack/spack/packages.py
+++ b/lib/spack/spack/packages.py
@@ -119,8 +119,15 @@ class PackageDB(object):
@_autospec
def installed_extensions_for(self, extendee_spec):
- return [s.package for s in self.installed_package_specs()
- if s.package.extends(extendee_spec)]
+ for s in self.installed_package_specs():
+ try:
+ if s.package.extends(extendee_spec):
+ yield s.package
+ except UnknownPackageError, e:
+ # Skip packages we know nothing about
+ continue
+ # TODO: add some conditional way to do this instead of
+ # catching exceptions.
def dirname_for_package_name(self, pkg_name):