fixed str to to_str

This commit is contained in:
Brian Coca 2016-03-03 14:40:22 -05:00
parent 347aa7b032
commit c022a43a47

View file

@ -491,7 +491,7 @@ class Templar:
try:
res = j2_concat(rf)
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 += "Make sure your variable name does not contain invalid characters like '-': %s" % to_str(te)
raise AnsibleUndefinedVariable(errmsg)