Fix indexed_items.py to run on python3 (#17292)

On python3, zip is a iterator so we need
to explictily create the list from that.
This commit is contained in:
Michael Scherer 2016-08-30 18:49:58 +02:00 committed by Toshio Kuratomi
parent 9c311b6b13
commit 8f364b549b

View file

@ -31,5 +31,5 @@ class LookupModule(LookupBase):
raise AnsibleError("with_indexed_items expects a list")
items = self._flatten(terms)
return zip(range(len(items)), items)
return list(zip(range(len(items)), items))