mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
fixed str to to_str
This commit is contained in:
@@ -491,7 +491,7 @@ class Templar:
|
|||||||
try:
|
try:
|
||||||
res = j2_concat(rf)
|
res = j2_concat(rf)
|
||||||
except TypeError as te:
|
except TypeError as te:
|
||||||
if 'StrictUndefined' in str(te):
|
if 'StrictUndefined' in to_str(te):
|
||||||
errmsg = "Unable to look up a name or access an attribute in template string (%s).\n" % to_str(data)
|
errmsg = "Unable to look up a name or access an attribute in template string (%s).\n" % to_str(data)
|
||||||
errmsg += "Make sure your variable name does not contain invalid characters like '-': %s" % to_str(te)
|
errmsg += "Make sure your variable name does not contain invalid characters like '-': %s" % to_str(te)
|
||||||
raise AnsibleUndefinedVariable(errmsg)
|
raise AnsibleUndefinedVariable(errmsg)
|
||||||
|
|||||||
Reference in New Issue
Block a user