From 9087f26537304727fc268023233a705481afc26a Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 14 Jul 2015 23:59:03 -0700 Subject: [PATCH] Fix mangled error message. --- lib/spack/spack/packages.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/packages.py b/lib/spack/spack/packages.py index 43c4c191c1..adfbc26c1d 100644 --- a/lib/spack/spack/packages.py +++ b/lib/spack/spack/packages.py @@ -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