Skip to content

Commit

Permalink
fix salt-call bug in color output
Browse files Browse the repository at this point in the history
  • Loading branch information
thatch45 committed Sep 17, 2011
1 parent 62575c0 commit ab8459a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions salt/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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):
Expand Down

0 comments on commit ab8459a

Please sign in to comment.