mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
#2503 make singletons compared with "is" not == or !=
Thanks to Wummel for the patch
This commit is contained in:
parent
672fbf5195
commit
5b63acd31e
54 changed files with 140 additions and 141 deletions
|
@ -289,7 +289,7 @@ def runCommand(commandline):
|
|||
fd = os.popen(commandline, 'r')
|
||||
data = fd.read()
|
||||
xit = fd.close()
|
||||
if xit != None:
|
||||
if xit is not None:
|
||||
sys.stdout.write(data)
|
||||
raise RuntimeError, "command failed: %s"%(commandline,)
|
||||
|
||||
|
@ -300,7 +300,7 @@ def captureCommand(commandline):
|
|||
fd = os.popen(commandline, 'r')
|
||||
data = fd.read()
|
||||
xit = fd.close()
|
||||
if xit != None:
|
||||
if xit is not None:
|
||||
sys.stdout.write(data)
|
||||
raise RuntimeError, "command failed: %s"%(commandline,)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue