mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Merge pull request #20444 from cachedout/async_client_outputter
Use correct outputter in asynclient mixin
This commit is contained in:
commit
3c8217528e
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user