mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
only read file if it is not a string
This commit is contained in:
parent
bb1dfd4a42
commit
d397c90e92
1 changed files with 2 additions and 1 deletions
|
@ -779,7 +779,8 @@ def _render(template, render, renderer, template_dict, opts):
|
|||
blacklist = opts.get('renderer_blacklist')
|
||||
whitelist = opts.get('renderer_whitelist')
|
||||
ret = compile_template(template, rend, renderer, blacklist, whitelist, **template_dict)
|
||||
ret = ret.read()
|
||||
if salt.utils.stringio.is_readable(ret):
|
||||
ret = ret.read()
|
||||
if str(ret).startswith('#!') and not str(ret).startswith('#!/'):
|
||||
ret = str(ret).split('\n', 1)[1]
|
||||
return ret
|
||||
|
|
Loading…
Add table
Reference in a new issue