fix InternalConcretizerError msg (#37791)

This commit is contained in:
Harmen Stoppels 2023-05-29 11:24:43 +02:00 committed by Massimiliano Culpo
parent d860083b08
commit 5821746258

View File

@ -2836,12 +2836,13 @@ class InternalConcretizerError(spack.error.UnsatisfiableSpecError):
""" """
def __init__(self, provided, conflicts): def __init__(self, provided, conflicts):
indented = [" %s\n" % conflict for conflict in conflicts] msg = (
error_msg = "".join(indented) "Spack concretizer internal error. Please submit a bug report and include the "
msg = "Spack concretizer internal error. Please submit a bug report" "command, environment if applicable and the following error message."
msg += "\n Please include the command, environment if applicable," f"\n {provided} is unsatisfiable, errors are:"
msg += "\n and the following error message." )
msg = "\n %s is unsatisfiable, errors are:\n%s" % (provided, error_msg)
msg += "".join([f"\n {conflict}" for conflict in conflicts])
super(spack.error.UnsatisfiableSpecError, self).__init__(msg) super(spack.error.UnsatisfiableSpecError, self).__init__(msg)