Call out to _pki_minions() once, rather than in a loop in _check_list_minions()

Fixes #39863
This commit is contained in:
rallytime 2017-04-10 15:09:58 -06:00
parent 4fa58be222
commit 1a9f03ab92

View File

@ -207,7 +207,8 @@ class CkMinions(object):
'''
if isinstance(expr, six.string_types):
expr = [m for m in expr.split(',') if m]
return [x for x in expr if x in self._pki_minions()]
minions = self._pki_minions()
return [x for x in expr if x in minions]
def _check_pcre_minions(self, expr, greedy): # pylint: disable=unused-argument
'''