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

exception safe list/tuple replacing for non-str values

This commit is contained in:
Stoned Elipot 2013-03-12 05:01:45 +01:00
parent df9e716208
commit 8edda38c61

View file

@ -214,7 +214,7 @@ def varReplace(basedir, raw, vars, lookup_fatal=True, depth=0, expand_lists=Fals
replacement = m['replacement']
if expand_lists and isinstance(replacement, (list, tuple)):
replacement = ",".join(replacement)
replacement = ",".join([str(x) for x in replacement])
if isinstance(replacement, (str, unicode)):
replacement = varReplace(basedir, replacement, vars, lookup_fatal, depth=depth+1, expand_lists=expand_lists)
if replacement is None: