You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for example, need to change all of these: output = subprocess.check_output("scontrol show hostnames \"$SLURM_NODELIST\" | tr '\n' ','", shell=True)
to these: subprocess.check_output(["scontrol","show","hostnames",os.environ["SLURM_NODELIST"]]).replace("\n"," ")[:-1]
In this specific case, the quotes around $SLURM_NODELIST appear to condition adequately, but I think in general it is unsafe to use "shell=True" when unncessary.
The text was updated successfully, but these errors were encountered:
for example, need to change all of these:
output = subprocess.check_output("scontrol show hostnames \"$SLURM_NODELIST\" | tr '\n' ','", shell=True)
to these:
subprocess.check_output(["scontrol","show","hostnames",os.environ["SLURM_NODELIST"]]).replace("\n"," ")[:-1]
In this specific case, the quotes around $SLURM_NODELIST appear to condition adequately, but I think in general it is unsafe to use "shell=True" when unncessary.
The text was updated successfully, but these errors were encountered: