diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2015-02-15 01:49:50 -0800 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2015-02-15 01:49:50 -0800 |
commit | 82dc935a50874e899380f32a9a35b7cc4f76df87 (patch) | |
tree | f3cf0d1d97e16925e6313118a8e1aed198cb3302 | |
parent | 5c2608b032f04c063c437eca7d8360baaf6a2a16 (diff) | |
download | spack-82dc935a50874e899380f32a9a35b7cc4f76df87.tar.gz spack-82dc935a50874e899380f32a9a35b7cc4f76df87.tar.bz2 spack-82dc935a50874e899380f32a9a35b7cc4f76df87.tar.xz spack-82dc935a50874e899380f32a9a35b7cc4f76df87.zip |
installed_extensions_for no longer fails when nothing known about pkg
-rw-r--r-- | lib/spack/spack/packages.py | 11 |
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): |