From cf741ceb69f951448a61a2f654b198c1cde0c579 Mon Sep 17 00:00:00 2001 From: Florent Xicluna Date: Mon, 8 Mar 2010 10:58:12 +0000 Subject: [PATCH] Fix syntax: "rc != None" -> "rc is not None" --- Doc/library/subprocess.rst | 2 +- Lib/subprocess.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index 0dac62e4fc..9f4b90448d 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -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) diff --git a/Lib/subprocess.py b/Lib/subprocess.py index ba5ce01575..59ed60c16a 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -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) -- 2.40.0