Simplify and correct comparisons with None.

This commit is contained in:
Blair Zajac
2013-02-09 15:49:54 -08:00
committed by Michael DeHaan
parent 2172201795
commit fa8e653011
10 changed files with 16 additions and 16 deletions

View File

@@ -132,7 +132,7 @@ def regular_generic_msg(hostname, result, oneline, caption):
def banner(msg):
if cowsay != None:
if cowsay:
cmd = subprocess.Popen([cowsay, "-W", "60", msg],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(out, err) = cmd.communicate()

View File

@@ -501,7 +501,7 @@ class Runner(object):
else:
err = stderr
if rc != None:
if rc is not None:
return dict(rc=rc, stdout=out, stderr=err )
else:
return dict(stdout=out, stderr=err )