]> granicus.if.org Git - python/commitdiff
High byte is the exit status.
authorStefan Krah <stefan@bytereef.org>
Wed, 14 Jul 2010 10:16:11 +0000 (10:16 +0000)
committerStefan Krah <stefan@bytereef.org>
Wed, 14 Jul 2010 10:16:11 +0000 (10:16 +0000)
Doc/library/subprocess.rst

index c7a349b53229e0695909680651d4c388b05bd423..f75858dc564a50a59a25053330ca8d0ed96a5225 100644 (file)
@@ -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)