summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@googlemail.com>2017-04-28 15:37:47 +0200
committerAdam J. Stewart <ajstewart426@gmail.com>2017-04-28 08:37:47 -0500
commit59ac047996f0391f6e7d102930be91a5e7311d86 (patch)
tree3e6303e714f5d2ebfb4d8fe8a716f05eadc14a62 /lib
parent8d92e267126bbe061fb4f799944109cd9b0ba42a (diff)
downloadspack-59ac047996f0391f6e7d102930be91a5e7311d86.tar.gz
spack-59ac047996f0391f6e7d102930be91a5e7311d86.tar.bz2
spack-59ac047996f0391f6e7d102930be91a5e7311d86.tar.xz
spack-59ac047996f0391f6e7d102930be91a5e7311d86.zip
No compiler found: fixed error message (#4034)
When a compiler was not found a stacktrace was displayed to user because there were three arguments to be substituted in a string with only two substitutions to be done.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/concretize.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py
index 0b29d2874e..5507b599ff 100644
--- a/lib/spack/spack/concretize.py
+++ b/lib/spack/spack/concretize.py
@@ -451,10 +451,11 @@ class UnavailableCompilerVersionError(spack.error.SpackError):
compiler spec."""
def __init__(self, compiler_spec, arch=None):
- err_msg = "No compilers with spec %s found" % compiler_spec
+ err_msg = "No compilers with spec {0} found".format(compiler_spec)
if arch:
- err_msg += (" for operating system %s and target %s." %
- (compiler_spec, arch.platform_os, arch.target))
+ err_msg += " for operating system {0} and target {1}.".format(
+ arch.platform_os, arch.target
+ )
super(UnavailableCompilerVersionError, self).__init__(
err_msg, "Run 'spack compiler find' to add compilers.")