From c022a43a47eee8debe3d026d571a419d9c8c2eda Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 3 Mar 2016 14:40:22 -0500 Subject: [PATCH] fixed str to to_str --- lib/ansible/template/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/template/__init__.py b/lib/ansible/template/__init__.py index 806c964246c..19925aa26b0 100644 --- a/lib/ansible/template/__init__.py +++ b/lib/ansible/template/__init__.py @@ -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)