mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
fix salt-call bug in color output
This commit is contained in:
parent
62575c03ec
commit
ab8459a619
1 changed files with 4 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Reference in a new issue