Skip to content

Commit 2433a1f

Browse files
committed
Fixed launcher output processing
1 parent 931b6f1 commit 2433a1f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/psij/launchers/script_based_launcher.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,9 @@ def get_additional_args(self, job: Job) -> List[str]:
202202

203203
def is_launcher_failure(self, output: str) -> bool:
204204
"""See :func:`~psij.job_launcher.Launcher.is_launcher_failure`."""
205-
return output.split('\n')[-1] != '_PSI_J_LAUNCHER_DONE'
205+
# last line should be an empty line
206+
return output.split('\n')[-2] != '_PSI_J_LAUNCHER_DONE'
206207

207208
def get_launcher_failure_message(self, output: str) -> str:
208209
"""See :func:`~psij.job_launcher.Launcher.get_launcher_failure_message`."""
209-
return '\n'.join(output.split('\n')[:-1])
210+
return '\n'.join(output.split('\n')[:-2])

0 commit comments

Comments
 (0)