Fix mangled error message.

This commit is contained in:
Todd Gamblin 2015-07-14 23:59:03 -07:00
parent 8828dbf2e8
commit 9087f26537

View file

@ -108,7 +108,7 @@ def providers_for(self, vpkg_spec):
providers = self.provider_index.providers_for(vpkg_spec)
if not providers:
raise UnknownPackageError("No such virtual package: %s" % vpkg_spec)
raise UnknownPackageError(vpkg_spec.name)
return providers
@ -238,7 +238,7 @@ def get_class_for_package_name(self, pkg_name):
class UnknownPackageError(spack.error.SpackError):
"""Raised when we encounter a package spack doesn't have."""
def __init__(self, name):
super(UnknownPackageError, self).__init__("Package %s not found." % name)
super(UnknownPackageError, self).__init__("Package '%s' not found." % name)
self.name = name