mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
parent
6d87bd405d
commit
71ffb86c30
1 changed files with 7 additions and 3 deletions
|
@ -81,9 +81,13 @@ class Display:
|
|||
self.set_cowsay_info()
|
||||
|
||||
if self.cowsay:
|
||||
try:
|
||||
cmd = subprocess.Popen([self.cowsay, "-l"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
(out, err) = cmd.communicate()
|
||||
self.cows_available = list(set(C.ANSIBLE_COW_WHITELIST).intersection(out.split()))
|
||||
except:
|
||||
# could not execute cowsay for some reason
|
||||
self.cowsay = False
|
||||
|
||||
self._set_column_width()
|
||||
|
||||
|
|
Loading…
Reference in a new issue