mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Improve error on mac_utils
This commit is contained in:
parent
58cd2a7c9a
commit
ea823932c2
@ -115,6 +115,7 @@ def execute_return_success(cmd):
|
||||
msg = 'Command Failed: {0}\n'.format(cmd)
|
||||
msg += 'Return Code: {0}\n'.format(ret['retcode'])
|
||||
msg += 'Output: {0}\n'.format(ret['stdout'])
|
||||
msg += 'Error: {0}\n'.format(ret['stderr'])
|
||||
raise CommandExecutionError(msg)
|
||||
|
||||
return True
|
||||
@ -133,7 +134,10 @@ def execute_return_result(cmd):
|
||||
ret = _run_all(cmd)
|
||||
|
||||
if ret['retcode'] != 0:
|
||||
msg = 'Command failed: {0}'.format(ret['stderr'])
|
||||
msg = 'Command Failed: {0}\n'.format(cmd)
|
||||
msg += 'Return Code: {0}\n'.format(ret['retcode'])
|
||||
msg += 'Output: {0}\n'.format(ret['stdout'])
|
||||
msg += 'Error: {0}\n'.format(ret['stderr'])
|
||||
raise CommandExecutionError(msg)
|
||||
|
||||
return ret['stdout']
|
||||
|
Loading…
Reference in New Issue
Block a user