How to get exit code when using Python subprocess communicate method?
Popen.communicate will set the returncode attribute when it’s done(*). Here’s the relevant documentation section: Popen.returncode The child return code, set by poll() and wait() (and indirectly by communicate()). A None value indicates that the process hasn’t terminated yet. A negative value -N indicates that the child was terminated by signal N (Unix only). So you … Read more