set 'nonstring' arg to passthru.

This commit is contained in:
Shirou WAKAYAMA 2015-03-12 12:36:50 +09:00 committed by Toshio Kuratomi
parent a388cd69c0
commit 1c09660c44

View file

@ -184,8 +184,7 @@ class _jinja2_vars(object):
var = self.vars[varname]
# HostVars is special, return it as-is, as is the special variable
# 'vars', which contains the vars structure
if type(var) == str:
var = to_unicode(var)
var = to_unicode(var, nonstring="passthru")
if isinstance(var, dict) and varname == "vars" or isinstance(var, HostVars):
return var
else: