Skip to content

Commit

Permalink
Fail if process exits with non-zero status (aiidalab#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhollas authored Sep 20, 2022
1 parent 97c4d79 commit d49023d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions aiidalab_qe/steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,9 +927,12 @@ def _update_state(self):
ProcessState.WAITING,
):
self.state = self.State.ACTIVE
elif process_state in (ProcessState.EXCEPTED, ProcessState.KILLED):
elif (
process_state in (ProcessState.EXCEPTED, ProcessState.KILLED)
or self.process.is_failed
):
self.state = self.State.FAIL
elif process_state is ProcessState.FINISHED:
elif self.process.is_finished_ok:
self.state = self.State.SUCCESS

@traitlets.observe("process")
Expand Down

0 comments on commit d49023d

Please sign in to comment.