mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #48834 from gtmanfred/slsutil
read output of stringio if it is readable
This commit is contained in:
commit
0a19f845ea
@ -127,10 +127,12 @@ def renderer(path=None, string=None, default_renderer='jinja|yaml', **kwargs):
|
||||
path_or_string = ':string:'
|
||||
kwargs['input_data'] = string
|
||||
|
||||
return salt.template.compile_template(
|
||||
path_or_string,
|
||||
renderers,
|
||||
default_renderer,
|
||||
__opts__['renderer_blacklist'],
|
||||
__opts__['renderer_whitelist'],
|
||||
**kwargs)
|
||||
ret = salt.template.compile_template(
|
||||
path_or_string,
|
||||
renderers,
|
||||
default_renderer,
|
||||
__opts__['renderer_blacklist'],
|
||||
__opts__['renderer_whitelist'],
|
||||
**kwargs
|
||||
)
|
||||
return ret.read() if __utils__['stringio.is_readable'](ret) else ret
|
||||
|
Loading…
Reference in New Issue
Block a user