now correctly 'types' value pairs that are passed as options to jinja

override
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
pull/3731/head
Brian Coca 11 years ago
parent 0335d05f43
commit 581a0c9f59

@ -28,6 +28,7 @@ import time
import subprocess
import datetime
import pwd
import ast
class Globals(object):
@ -435,7 +436,7 @@ def template_from_file(basedir, path, vars):
data = data[eol+1:]
for pair in line.split(','):
(key,val) = pair.split(':')
setattr(environment,key.strip(),val.strip())
setattr(environment,key.strip(),ast.literal_eval(val.strip()))
environment.template_class = J2Template
t = environment.from_string(data)

Loading…
Cancel
Save