3 ms·
Perhaps sometimes. But properly handling errors around process management in python is not simple either, even with libraries like subprocess. My experience is
by stormbrew 6y ago
Perhaps sometimes. But properly handling errors around process management in python is not simple either, even with libraries like subprocess. My experience is that when python scripts doing a lot of process management fail they fail in far more complex and hard to diagnose ways than shell scripts do (especially bash scripts with `set -e -o pipefail`).
And like, `subprocess.run()` defaults its check argument (that will make it throw an exception on non-zero exit code) to false, which means that to get that same kind of behaviour as `set -e` in python means making sure you always pass check=False to every invocation, afaik.
Sometimes added complexity can introduce classes of errors.