Re: Getting the exit code of a subprocess

2021-12-15 Thread Jason
On Wed, Dec 15, 2021 at 08:19:16PM -0800, Kushal Kumaran wrote: > On Wed, Dec 15 2021 at 09:38:48 PM, Jason wrote: > > Hello, > > > > How can I find out the exit code of a process when using the > > subprocess module? I am passing an email message to a shell script and > > I need to know whether t

Re: Getting the exit code of a subprocess

2021-12-15 Thread Kushal Kumaran
On Wed, Dec 15 2021 at 09:38:48 PM, Jason wrote: > Hello, > > How can I find out the exit code of a process when using the > subprocess module? I am passing an email message to a shell script and > I need to know whether the shell script threw an error. > > Here is my code: > p = Popen(cmd, stdout