Batch.run() should return minion name as

- When using Batch.run() (or client.cmd_batch()) there was no way to tell
  from what minion the returned date came from.
- Batch.run() returns a dictionary which has minion id as a key, and
  returned data as a value
This commit is contained in:
Ales Zoulek 2012-12-17 22:12:15 +01:00
parent 4bb4fa6617
commit cb59d41b2e

View File

@ -119,7 +119,7 @@ class Batch(object):
pass
for minion, data in parts.items():
active.remove(minion)
yield data['ret']
yield {minion: data['ret']}
ret[minion] = data['ret']
data[minion] = data.pop('ret')
if 'out' in data: