Fix regression in salt-ssh caused by yaml utf8 check

This commit is contained in:
Thomas S Hatch 2013-12-26 14:02:23 -07:00
parent 76d027e6b0
commit b31f42d5d8

View File

@ -57,9 +57,10 @@ def render(yaml_data, saltenv='base', sls='', argline='', **kws):
if not data:
data = {}
else:
if 'config.get' in __salt__:
if __salt__['config.get']('yaml_utf8', False):
data = _yaml_result_unicode_to_utf8(data)
if isinstance(__salt__, dict):
if 'config.get' in __salt__:
if __salt__['config.get']('yaml_utf8', False):
data = _yaml_result_unicode_to_utf8(data)
log.debug('Results of YAML rendering: \n{0}'.format(data))
return data