fix InternalConcretizerError msg (#37791)

This commit is contained in:
Harmen Stoppels 2023-05-29 11:24:43 +02:00 committed by GitHub
parent fddaeadff8
commit 3b59c95323
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)