Turns out subprocess.check_output() is almost exactly what we need here, except that it drops stderr on the floor. I copied its implementation and added stderr support to CalledProcessError to make our use case run more smoothly. No more file i/o.
If this looks good I'll apply the same fixes to drm_slurm.
Turns out subprocess.check_output() is almost exactly what we need here, except that it drops stderr on the floor. I copied its implementation and added stderr support to CalledProcessError to make our use case run more smoothly. No more file i/o.
If this looks good I'll apply the same fixes to drm_slurm.