]> granicus.if.org Git - python/commitdiff
Fix syntax: "rc != None" -> "rc is not None"
authorFlorent Xicluna <florent.xicluna@gmail.com>
Mon, 8 Mar 2010 10:58:12 +0000 (10:58 +0000)
committerFlorent Xicluna <florent.xicluna@gmail.com>
Mon, 8 Mar 2010 10:58:12 +0000 (10:58 +0000)
Doc/library/subprocess.rst
Lib/subprocess.py

index 0dac62e4fc932a5e9df21253816465da2e85c620..9f4b90448d6c69fa7d0e976d3462879853529b4c 100644 (file)
@@ -541,7 +541,7 @@ Return code handling translates as follows::
    pipe = os.popen("cmd", 'w')
    ...
    rc = pipe.close()
-   if rc != None and rc % 256:
+   if rc is not None and rc % 256:
        print "There were some errors"
    ==>
    process = Popen("cmd", 'w', shell=True, stdin=PIPE)
index ba5ce015759c4fb7ee298d981a3a92fb7ccbcfe6..59ed60c16a2f47391e5db3907d4c4ddbfc84771f 100644 (file)
@@ -349,7 +349,7 @@ Return code handling translates as follows:
 pipe = os.popen("cmd", 'w')
 ...
 rc = pipe.close()
-if rc != None and rc % 256:
+if rc is not None and rc % 256:
     print "There were some errors"
 ==>
 process = Popen("cmd", 'w', shell=True, stdin=PIPE)