Skip to content
Snippets Groups Projects
Commit a5f1d0c4 authored by Christopher J. Morrone's avatar Christopher J. Morrone
Browse files

Quite available_nodes and default_partition functions by catching a failed

close on the file descriptor.
parent cdb22718
No related branches found
No related tags found
No related merge requests found
......@@ -597,7 +597,7 @@ proc available_nodes { partition } {
set available -1
set fd [open "|$sinfo --noheader --partition pdebug --state idle,alloc,comp --format %D"]
gets $fd line
close $fd
catch [close $fd]
regexp {\d+} $line available
return $available
}
......@@ -624,7 +624,7 @@ proc default_partition {} {
break
}
}
close $fd
catch [close $fd]
if {[string length $name] == 0} {
send_user "ERROR: could not identify the default partition"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment