pyFoam: Why no non-zero return codes?
I'm wondering why some (all?) pyFoam tools do not return a non-zero return code if the openfoam tool fails.
pyFoamRunner.py --autosense-parallel potentialFoam -noFunctionObjects
fails because there is some dictionary entry missing, the return code is 0.
mpirun -n 2 potentialFoam -noFunctionObjects
fails too, but with a return code of 1.
Same for pyFoamRunner.py.
Returning non-zero exit code to indicate an error makes it much easier for scripts to use pyFoam.
Any reason for this design decision or just not implemented yet?
- I didn't need it yet (I don't check return codes in shell-scripts. If that is necessary I use Python)
- there was no feature-request on the Mantis yet
So this is NO design decision
Ok, the bugtracker is offline at the moment, I will file a request later and will also have a look at the code and see if I can produce a patch.
|All times are GMT -4. The time now is 12:40.|