mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
Simplify and correct comparisons with None.
This commit is contained in:
parent
2172201795
commit
fa8e653011
10 changed files with 16 additions and 16 deletions
|
@ -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 )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue