Skip to content

Commit

Permalink
Handle error case for missing failure reason
Browse files Browse the repository at this point in the history
  • Loading branch information
dgovil committed Oct 20, 2023
1 parent 11905a6 commit 43b27be
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/rez/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 43b27be

Please sign in to comment.