Skip to content

Commit 17307ad

Browse files
committed
Make sure fix works for non-slurm dry-run too
1 parent 25d47bf commit 17307ad

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cloudai/systems/slurm/slurm_system.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,7 @@ 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.splitlines()[0].strip().replace("|", "")))
764+
spec = out.splitlines()[0] if out.splitlines() else out
765+
nodelist = set(parse_node_list(spec.strip().replace("|", "")))
765766
to_unlock = [node for node in self.group_allocated if node.name in nodelist]
766767
self.group_allocated.difference_update(to_unlock)

0 commit comments

Comments
 (0)