mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Fix issue where interfaces pass in _out
This commit is contained in:
parent
6dbe1057d2
commit
9afa5b8b2f
@ -11,20 +11,15 @@ def display_output(data, out, opts=None):
|
||||
'''
|
||||
Print the passed data using the desired output
|
||||
'''
|
||||
if opts is None:
|
||||
opts = {}
|
||||
if not 'color' in opts:
|
||||
opts['color'] = not bool(opts.get('no_color', False))
|
||||
outputters = salt.loader.outputters(opts)
|
||||
if not out in outputters:
|
||||
outputters['pprint'](data)
|
||||
outputters[out](data)
|
||||
get_printout(out, opts)(data)
|
||||
|
||||
|
||||
def get_printout(out, opts=None, **kwargs):
|
||||
'''
|
||||
Return a printer function
|
||||
'''
|
||||
if out.endswith('_out'):
|
||||
out = out[:-4]
|
||||
if opts is None:
|
||||
opts = {}
|
||||
opts.update(kwargs)
|
||||
|
Loading…
Reference in New Issue
Block a user