Skip to content

Commit a4aaf8f

Browse files
committed
Circumvent bug in slurm sbatch --parsable command (see #148)
1 parent aec79ac commit a4aaf8f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

batchspawner/batchspawner.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,8 @@ class SlurmSpawner(UserEnvMixin,BatchSpawnerRegexStates):
612612
def parse_job_id(self, output):
613613
# make sure jobid is really a number
614614
try:
615+
# use only last line to circumvent slurm bug
616+
output = output.splitlines()[-1]
615617
id = output.split(';')[0]
616618
int(id)
617619
except Exception as e:

0 commit comments

Comments
 (0)