From 3b59c953238e377c2fc624b82dab20d5658ee625 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 29 May 2023 11:24:43 +0200 Subject: fix InternalConcretizerError msg (#37791) --- lib/spack/spack/solver/asp.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index 4e51baae0c..90849aaf8f 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -2836,12 +2836,13 @@ class InternalConcretizerError(spack.error.UnsatisfiableSpecError): """ def __init__(self, provided, conflicts): - indented = [" %s\n" % conflict for conflict in conflicts] - error_msg = "".join(indented) - msg = "Spack concretizer internal error. Please submit a bug report" - msg += "\n Please include the command, environment if applicable," - msg += "\n and the following error message." - msg = "\n %s is unsatisfiable, errors are:\n%s" % (provided, error_msg) + msg = ( + "Spack concretizer internal error. Please submit a bug report and include the " + "command, environment if applicable and the following error message." + f"\n {provided} is unsatisfiable, errors are:" + ) + + msg += "".join([f"\n {conflict}" for conflict in conflicts]) super(spack.error.UnsatisfiableSpecError, self).__init__(msg) -- cgit v1.2.3-70-g09d2