Fix issue where interfaces pass in _out

This commit is contained in:
Thomas S Hatch 2012-10-24 18:20:46 -06:00
parent 6dbe1057d2
commit 9afa5b8b2f

View File

@ -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)