mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #13864 from whiteinge/salt-ssh-sls-dict-tweaks
Tweaks to salt-ssh error handling
This commit is contained in:
commit
cc91ebd6dd
@ -14,7 +14,7 @@ import salt.utils
|
||||
import salt.client.ssh
|
||||
|
||||
|
||||
class FunctionWrapper(object):
|
||||
class FunctionWrapper(dict):
|
||||
'''
|
||||
Create an object that acts like the salt function dict and makes function
|
||||
calls remotely via the SSH shell system
|
||||
|
@ -80,7 +80,12 @@ def sls(mods, saltenv='base', test=None, exclude=None, env=None, **kwargs):
|
||||
trans_tar,
|
||||
'/tmp/.salt/salt_state.tgz')
|
||||
stdout, stderr, _ = single.cmd_block()
|
||||
return json.loads(stdout, object_hook=salt.utils.decode_dict)
|
||||
try:
|
||||
return json.loads(stdout, object_hook=salt.utils.decode_dict)
|
||||
except Exception, e:
|
||||
log.error("JSON Render failed for: {0}".format(stdout))
|
||||
log.error(str(e))
|
||||
return stdout
|
||||
|
||||
|
||||
def low(data, **kwargs):
|
||||
|
Loading…
Reference in New Issue
Block a user