mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 22:33:25 +00:00
Simplify and correct comparisons with None.
This commit is contained in:
committed by
Michael DeHaan
parent
2172201795
commit
fa8e653011
@@ -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()
|
||||
|
||||
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user