Merge pull request #10 from cachedout/pr-38668

Munge retcode into return data for batching
This commit is contained in:
Erik Johnson 2017-01-17 17:10:20 -06:00 committed by GitHub
commit 0ea97cdad9

View file

@ -223,6 +223,9 @@ class Batch(object):
active.remove(minion)
if bwait:
wait.append(datetime.now() + timedelta(seconds=bwait))
# Munge retcode into return data
if 'retcode' in data and isinstance(data['ret'], dict) and 'retcode' not in data['ret']:
data['ret']['retcode'] = data['retcode']
if self.opts.get('raw'):
ret[minion] = data
yield data