Comment 5 for bug 2031897

Revision history for this message
Tony Liu (tonyliu0592) wrote :

I'm not using Cinder for this.
Here is my code.

    p = await asyncio.create_subprocess_shell(cmd,
            stdout=asyncio.subprocess.PIPE,
            stderr=asyncio.subprocess.PIPE)
    stdout, stderr = await p.communicate()
    rc = p.returncode

When cmd is "p1 | p2", and p1 exits error, rc will be that error.
It works fine for me.