Merge branch 'zenbot-refresh-inventory-exit' into devel
This commit is contained in:
commit
64a738ce51
1 changed files with 2 additions and 2 deletions
|
@ -204,7 +204,7 @@ class Inventory(object):
|
||||||
|
|
||||||
# exclude hosts mentioned in any restriction (ex: failed hosts)
|
# exclude hosts mentioned in any restriction (ex: failed hosts)
|
||||||
if self._restriction is not None:
|
if self._restriction is not None:
|
||||||
hosts = [ h for h in hosts if h in self._restriction ]
|
hosts = [ h for h in hosts if h.name in self._restriction ]
|
||||||
|
|
||||||
seen = set()
|
seen = set()
|
||||||
HOSTS_PATTERNS_CACHE[pattern_hash] = [x for x in hosts if x not in seen and not seen.add(x)]
|
HOSTS_PATTERNS_CACHE[pattern_hash] = [x for x in hosts if x not in seen and not seen.add(x)]
|
||||||
|
@ -600,7 +600,7 @@ class Inventory(object):
|
||||||
return
|
return
|
||||||
elif not isinstance(restriction, list):
|
elif not isinstance(restriction, list):
|
||||||
restriction = [ restriction ]
|
restriction = [ restriction ]
|
||||||
self._restriction = restriction
|
self._restriction = [ h.name for h in restriction ]
|
||||||
|
|
||||||
def subset(self, subset_pattern):
|
def subset(self, subset_pattern):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue