fix salt-call bug in color output

This commit is contained in:
Thomas S Hatch 2011-09-17 13:21:10 -06:00
parent 62575c03ec
commit ab8459a619

View file

@ -145,6 +145,8 @@ class JSONOutputter(Outputter):
def __call__(self, data, **kwargs):
try:
# A good kwarg might be: indent=4
if kwargs.has_key('color'):
kwargs.pop('color')
ret = json.dumps(data, **kwargs)
except TypeError:
# Return valid json for unserializable objects
@ -158,6 +160,8 @@ class YamlOutputter(Outputter):
supports = "yaml"
def __call__(self, data, **kwargs):
if kwargs.has_key('color'):
kwargs.pop('color')
print yaml.dump(data, **kwargs)
def get_outputter(name=None):