diff --git a/pysqa/wrapper/slurm.py b/pysqa/wrapper/slurm.py index 7f1a199..6ba6f19 100644 --- a/pysqa/wrapper/slurm.py +++ b/pysqa/wrapper/slurm.py @@ -47,7 +47,13 @@ def get_queue_status_command(self) -> list[str]: @staticmethod def get_job_id_from_output(queue_submit_output: str) -> int: """Extracts the job ID from the output of the job submission command.""" - return int(queue_submit_output.splitlines()[-1].rstrip().lstrip().split()[-1]) + return int( + queue_submit_output.splitlines()[-1] + .rstrip() + .lstrip() + .split()[-1] + .split(";")[0] + ) @staticmethod def convert_queue_status(queue_status_output: str) -> pandas.DataFrame: