mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Revert "[stable-2.7] Handle sets differently than lists in wrap_var. Fixes #47372."
This reverts commit 0e933f76ba4edb0e06f0779f5fb4b0ea85191e8b. The tests for this were broken on centos6 because jinja2 does not have a map filter on that platform. Tests need to be rewritten
This commit is contained in:
@@ -95,17 +95,11 @@ def _wrap_list(v):
|
||||
return v
|
||||
|
||||
|
||||
def _wrap_set(v):
|
||||
return set(item if item is None else wrap_var(item) for item in v)
|
||||
|
||||
|
||||
def wrap_var(v):
|
||||
if isinstance(v, Mapping):
|
||||
v = _wrap_dict(v)
|
||||
elif isinstance(v, MutableSequence):
|
||||
elif isinstance(v, (MutableSequence, Set)):
|
||||
v = _wrap_list(v)
|
||||
elif isinstance(v, Set):
|
||||
v = _wrap_set(v)
|
||||
elif v is not None and not isinstance(v, AnsibleUnsafe):
|
||||
v = UnsafeProxy(v)
|
||||
return v
|
||||
|
||||
Reference in New Issue
Block a user