Munge retcode into return data for batching

This commit is contained in:
Mike Place 2017-01-17 11:31:45 -07:00
parent a642a995dc
commit db81afc035
No known key found for this signature in database
GPG key ID: 9136F4F13705CFD3

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