"of nodes: %s" % nodespec) from e
node_descriptions = completed.stdout.splitlines()
return {SlurmNode(descr) for descr in node_descriptions}
def _set_nodelist(self, nodespec):
if self._nodelist is not None:
return
After Change
def _get_nodes_by_name(self, nodespec):
completed = _run_command("scontrol -a show -o node %s" % nodespec)
node_descriptions = completed.stdout.splitlines()
nodes_avail = set()
for descr in node_descriptions:
try:
nodes_avail.add(SlurmNode(descr))
except JobError:
pass
return nodes_avail