summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Krah <stefan@bytereef.org>2010-07-14 10:06:07 +0000
committerStefan Krah <stefan@bytereef.org>2010-07-14 10:06:07 +0000
commita253dc1da04fa05600039c0e19a9a13878524ecd (patch)
treea5c5f58b4a7982b6eb197de48a273ed7c5e205ba
parenteefec7b85793b08ed5a6fc5d2cfd0eb214f7e139 (diff)
downloadcpython-git-a253dc1da04fa05600039c0e19a9a13878524ecd.tar.gz
High byte is the exit status.
-rw-r--r--Doc/library/subprocess.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index b5e769cab5..3ca0db98cb 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -551,7 +551,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', shell=True, stdin=PIPE)