mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Invoke cowsay without going through the shell
This commit is contained in:
parent
00c4c5c4a1
commit
2d448f2a34
1 changed files with 2 additions and 2 deletions
|
@ -121,8 +121,8 @@ def regular_generic_msg(hostname, result, oneline, caption):
|
|||
def banner(msg):
|
||||
|
||||
if cowsay != None:
|
||||
cmd = subprocess.Popen("%s -W 60 \"%s\"" % (cowsay, msg),
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
||||
cmd = subprocess.Popen([cowsay, "-W", "60", msg],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
(out, err) = cmd.communicate()
|
||||
return "%s\n" % out
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue