fixed bug for string size mismatch, now substring depends on size of match string Signed-off-by: Brian Coca <briancoca+ansible@gmail.com>

Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
pull/1683/head
Brian Coca 12 years ago committed by Brian Coca
parent 6a1e2aaff5
commit d7f38d07b3

@ -279,7 +279,7 @@ def template_from_file(basedir, path, vars):
# Get jinja env overrides from template # Get jinja env overrides from template
if data.startswith(JINJA2_OVERRIDE): if data.startswith(JINJA2_OVERRIDE):
eol = data.find('\n') eol = data.find('\n')
line = data[5:eol] line = data[len(JINJA2_OVERRIDE):eol]
data = data[eol+1:] data = data[eol+1:]
for pair in line.split(','): for pair in line.split(','):
(key,val) = pair.split(':') (key,val) = pair.split(':')

Loading…
Cancel
Save