Skip to content

Commit 30fdb5e

Browse files
authored
Merge pull request #490 from ExaWorks/pbs_comment_fix
The "comment" field is not necessarily present for all states.
2 parents 103cb60 + ad71427 commit 30fdb5e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/psij/executors/batch/pbs_base.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,10 @@ def parse_status_output(self, exit_code: int, out: str) -> Dict[str, JobStatus]:
138138
elif 'Exit_status' in job_report and job_report['Exit_status'] != 0:
139139
state = JobState.FAILED
140140

141-
msg = job_report["comment"]
141+
try:
142+
msg = job_report['comment']
143+
except KeyError:
144+
msg = None
142145
r[native_id] = JobStatus(state, message=msg)
143146

144147
return r

0 commit comments

Comments
 (0)