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
This commit is contained in:
George Hartzell 2017-05-25 11:00:58 -07:00 committed by Adam J. Stewart
parent 53713d57c9
commit 26440accab

View File

@ -3395,7 +3395,8 @@ def __init__(self, spec, hash):
class NoSuchHashError(SpecError): class NoSuchHashError(SpecError):
def __init__(self, hash): def __init__(self, hash):
super(NoSuchHashError, self).__init__( super(NoSuchHashError, self).__init__(
"No installed spec matches the hash: '%s'") "No installed spec matches the hash: '%s'"
% hash)
class RedundantSpecError(SpecError): class RedundantSpecError(SpecError):