From 43b27be2c355964926a0a3e4f70cf7f81cd382b1 Mon Sep 17 00:00:00 2001 From: Dhruv Govil Date: Fri, 20 Oct 2023 14:12:10 -0700 Subject: [PATCH] Handle error case for missing failure reason --- src/rez/solver.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rez/solver.py b/src/rez/solver.py index 4a4420eed0..9a7c2264b2 100644 --- a/src/rez/solver.py +++ b/src/rez/solver.py @@ -2401,7 +2401,10 @@ def _get_failed_phase(self, index=None): except IndexError: raise IndexError("failure index out of range") - fail_description = phase.failure_reason.description() + if phase.failure_reason is None: + fail_description = "Solver failed with unknown reason." + else: + fail_description = phase.failure_reason.description() if prepend_abort_reason and self.abort_reason: fail_description = "%s:\n%s" % (self.abort_reason, fail_description)