Skip to content

Commit 25d47bf

Browse files
committed
Fix for dry-run on systems with slurm
Runnings sacct -j 0 can result in multi-line output.
1 parent 0204852 commit 25d47bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cloudai/systems/slurm/slurm_system.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,6 @@ def system_installables(self) -> list[Installable]:
761761

762762
def complete_job(self, job: SlurmJob) -> None:
763763
out, _ = self.fetch_command_output(f"sacct -j {job.id} -p --noheader -X --format=NodeList")
764-
nodelist = set(parse_node_list(out.strip().replace("|", "")))
764+
nodelist = set(parse_node_list(out.splitlines()[0].strip().replace("|", "")))
765765
to_unlock = [node for node in self.group_allocated if node.name in nodelist]
766766
self.group_allocated.difference_update(to_unlock)

0 commit comments

Comments
 (0)