Collect all error data from the wfuncs call

This commit is contained in:
Thomas S Hatch 2016-08-09 17:39:14 -06:00
parent 11864c31b7
commit 8a5b47b5d7

View file

@ -792,6 +792,12 @@ class Single(object):
minion_opts=self.minion_opts,
**self.target)
opts_pkg = pre_wrapper['test.opts_pkg']() # pylint: disable=E1102
if '_error' in opts_pkg:
#Refresh failed
retcode = opts_pkg['retcode']
ret = json.dumps({'local': opts_pkg})
return ret, retcode
opts_pkg['file_roots'] = self.opts['file_roots']
opts_pkg['pillar_roots'] = self.opts['pillar_roots']
opts_pkg['ext_pillar'] = self.opts['ext_pillar']
@ -807,12 +813,6 @@ class Single(object):
retcode = 0
if '_error' in opts_pkg:
#Refresh failed
retcode = opts_pkg['retcode']
ret = json.dumps({'local': opts_pkg['_error']})
return ret, retcode
pillar = salt.pillar.Pillar(
opts_pkg,
opts_pkg['grains'],