From 59ac047996f0391f6e7d102930be91a5e7311d86 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Fri, 28 Apr 2017 15:37:47 +0200 Subject: 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. --- lib/spack/spack/concretize.py | 7 ++++--- 1 file 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.") -- cgit v1.2.3-70-g09d2