From 26440accabc68d441b759f448ac0e76736fb3b3c Mon Sep 17 00:00:00 2001 From: George Hartzell Date: Thu, 25 May 2017 11:00:58 -0700 Subject: Touch up string expansion. (#4344) * Touch up string expansion. I'm chasing this: ``` $ (module purge; spack install perl %gcc/5.4.0) ==> Error: No installed spec matches the hash: '%s' ``` There's something deeper going on, but the error message isn't helpful. After this change it tells me this: ``` $ (module purge; spack install perl %gcc/5.4.0) ==> Error: No installed spec matches the hash: '5.4.0' ``` Which is weird because `5.4.0` is not a hash... Whatever is going on here, the error message needs to be fixed. * Flake8 whitespace --- lib/spack/spack/spec.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 9e89feb148..c757e6b0d6 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -3395,7 +3395,8 @@ class InvalidHashError(SpecError): class NoSuchHashError(SpecError): def __init__(self, hash): super(NoSuchHashError, self).__init__( - "No installed spec matches the hash: '%s'") + "No installed spec matches the hash: '%s'" + % hash) class RedundantSpecError(SpecError): -- cgit v1.2.3-60-g2f50