From: Stefan Krah Date: Wed, 14 Jul 2010 10:16:11 +0000 (+0000) Subject: High byte is the exit status. X-Git-Tag: v3.2a1~196 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fc9e08de3a05149c7f0b2334d88a7b80ca4063e3;p=python High byte is the exit status. --- diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index c7a349b532..f75858dc56 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -575,7 +575,7 @@ Return code handling translates as follows:: pipe = os.popen(cmd, 'w') ... rc = pipe.close() - if rc is not None and rc % 256: + if rc is not None and rc >> 8: print("There were some errors") ==> process = Popen(cmd, 'w', stdin=PIPE)