allow empty whitelist
This commit is contained in:
parent
8030f6fd45
commit
9ac9d42030
1 changed files with 3 additions and 1 deletions
|
@ -84,7 +84,9 @@ class Display:
|
|||
try:
|
||||
cmd = subprocess.Popen([self.b_cowsay, "-l"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
(out, err) = cmd.communicate()
|
||||
self.cows_available = [ to_bytes(c) for c in set(C.ANSIBLE_COW_WHITELIST).intersection(out.split())]
|
||||
self.cows_available = set([ to_bytes(c) for c in out.split() ])
|
||||
if C.ANSIBLE_COW_WHITELIST:
|
||||
self.cows_available = set(C.ANSIBLE_COW_WHITELIST).intersection(self.cows_available)
|
||||
except:
|
||||
# could not execute cowsay for some reason
|
||||
self.b_cowsay = False
|
||||
|
|
Loading…
Reference in a new issue