summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2023-05-29 11:24:43 +0200
committerGitHub <noreply@github.com>2023-05-29 11:24:43 +0200
commit3b59c953238e377c2fc624b82dab20d5658ee625 (patch)
treed535ef30dd11704eba3412ff02fed1828255eaec /lib
parentfddaeadff8d83ff6d46364192763a66ed6a21781 (diff)
downloadspack-3b59c953238e377c2fc624b82dab20d5658ee625.tar.gz
spack-3b59c953238e377c2fc624b82dab20d5658ee625.tar.bz2
spack-3b59c953238e377c2fc624b82dab20d5658ee625.tar.xz
spack-3b59c953238e377c2fc624b82dab20d5658ee625.zip
fix InternalConcretizerError msg (#37791)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/solver/asp.py13
1 files 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)