1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Allow subelements to work right with skipped results.

This commit is contained in:
Michael DeHaan 2013-10-09 15:55:32 -04:00
parent bd10aad71f
commit 2078518735

View file

@ -38,6 +38,8 @@ class LookupModule(object):
"subelements lookup expects a list of two items, first a dict or a list, and second a string") "subelements lookup expects a list of two items, first a dict or a list, and second a string")
if isinstance(terms[0], dict): # convert to list: if isinstance(terms[0], dict): # convert to list:
if terms[0].get('skipped',False) != False:
return []
elementlist = [] elementlist = []
for key in terms[0].iterkeys(): for key in terms[0].iterkeys():
elementlist.append(terms[0][key]) elementlist.append(terms[0][key])