subprocess returncode windows
Mark Hammond
skippy.hammond at gmail.com
Thu Feb 5 19:48:45 EST 2009
On 6/02/2009 6:34 AM, Andrew wrote:
> Notice how python never gets the correct returncode from asadmin.bat
> but I can get the correct returncode from the shell every time. Can
> anyone tell me why Python wouldn't be able to get the correct
> returncode for asadmin?
I think the problem will be that cmd.exe doesn't return the exit code to
*its* caller correctly. You can often work around this by avoiding the
use of cmd.exe to spawn the child process, but obviously you do need it
with a .bat file. I'm not aware of an easy work-around.
Cheers,
Mark
More information about the Python-list
mailing list