Improve error on mac_utils

This commit is contained in:
twangboy 2016-03-21 16:20:31 -06:00
parent 58cd2a7c9a
commit ea823932c2

View File

@ -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']