Updated patch which address also BSD and Solaris systems.
I also changed the behaviour when a required command is missing: return None instead of raising an OSError.
In the current code, when a command is missing, the shell scripts return the exit code 10. The Python codes checks for the exit code 10, but in fact os.popen() returns a status, not directly the exit code. So the OSError was never raised.
I don't know if it's better to return None instead of raising an error? It changes the behaviour, can it break backward compatibility? |