Merge pull request #20444 from cachedout/async_client_outputter

Use correct outputter in asynclient mixin
This commit is contained in:
Mike Place 2015-02-05 20:20:04 -07:00
commit 3c8217528e

View File

@ -449,7 +449,11 @@ class AsyncClientMixin(object):
# more general, since this will get *really* messy as # more general, since this will get *really* messy as
# people use more events that don't quite fit into this mold # people use more events that don't quite fit into this mold
if suffix == 'ret': # for "ret" just print out return if suffix == 'ret': # for "ret" just print out return
salt.output.display_output(event['return'], None, self.opts) if isinstance(event['return'], dict):
outputter = event['return'].pop('outputter', None)
else:
outputter = None
salt.output.display_output(event['return'], outputter, self.opts)
elif isinstance(event, dict) and 'outputter' in event and event['outputter'] is not None: elif isinstance(event, dict) and 'outputter' in event and event['outputter'] is not None:
print(self.outputters[event['outputter']](event['data'])) print(self.outputters[event['outputter']](event['data']))
# otherwise fall back on basic printing # otherwise fall back on basic printing