pavilion2
pavilion2 copied to clipboard
Properly handle exceptions with subprocess calls in the Slurm scheduler.
-
subprocess.check_outputwill raise aCalledProcessErrorif it returns non-zero. These should be handled. - stderr isn't redirected properly on such calls.
- decoding the output can raise an error too. These should be handled.
- Double check that all other subprocess calls are properly wrapped (most won't need the exception handling, but all need to redirect output properly.)