installed_extensions_for no longer fails when nothing known about pkg

This commit is contained in:
Todd Gamblin 2015-02-15 01:49:50 -08:00
parent 5c2608b032
commit 82dc935a50

View file

@ -119,8 +119,15 @@ def extensions_for(self, extendee_spec):
@_autospec @_autospec
def installed_extensions_for(self, extendee_spec): def installed_extensions_for(self, extendee_spec):
return [s.package for s in self.installed_package_specs() for s in self.installed_package_specs():
if s.package.extends(extendee_spec)] 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): def dirname_for_package_name(self, pkg_name):