* On 13 Oct 2015, David Champion wrote: 
> Hi Mathieu -
> 
> The return from python's os.system is not the same as the exit status.
> You need os.WEXITSTATUS(os.system(command)), which should be 0, or
> success.

I should add that you really should check other values as well -- for
example, if mutt dies a terrible death with a segmentation fault, you'll
see:

        code = os.system(cmd)
        os.WIFEXITED(code) -> False
        os.WIFSIGNALED(code) -> True
        os.WTERMSIG(code) -> signal.SIGSEGV

> For more details, see:
>       * pydoc os
>       * man 2 wait

-- 
David Champion • [email protected]

Reply via email to