Skip to content

Commit

Permalink
Merge pull request ansible#2371 from stoned/list-replacement-type-fix
Browse files Browse the repository at this point in the history
exception safe list/tuple replacing for non-str values
  • Loading branch information
mpdehaan committed Mar 12, 2013
2 parents df9e716 + 8edda38 commit 57d1935
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ansible/utils/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 57d1935

Please sign in to comment.