File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -240,14 +240,17 @@ def _get_reservation_nodes(self, reservation):
240240 return {SlurmNode (descr ) for descr in node_descriptions }
241241
242242 def _get_nodes_by_name (self , nodespec ):
243- try :
244- completed = _run_strict ('scontrol -a show -o node %s' % nodespec )
245- except SpawnedProcessError as e :
246- raise JobError ('could not retrieve the node description '
247- 'of nodes: %s' % nodespec ) from e
248-
243+ completed = os_ext .run_command ('scontrol -a show -o node %s' %
244+ nodespec )
249245 node_descriptions = completed .stdout .splitlines ()
250- return {SlurmNode (descr ) for descr in node_descriptions }
246+ nodes_avail = set ()
247+ for descr in node_descriptions :
248+ try :
249+ nodes_avail .add (SlurmNode (descr ))
250+ except JobError :
251+ pass
252+
253+ return nodes_avail
251254
252255 def _set_nodelist (self , nodespec ):
253256 if self ._nodelist is not None :
You can’t perform that action at this time.
0 commit comments