Skip to content

Commit ab8459a

Browse files
committed
fix salt-call bug in color output
1 parent 62575c0 commit ab8459a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

salt/output.py

+4
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ class JSONOutputter(Outputter):
145145
def __call__(self, data, **kwargs):
146146
try:
147147
# A good kwarg might be: indent=4
148+
if kwargs.has_key('color'):
149+
kwargs.pop('color')
148150
ret = json.dumps(data, **kwargs)
149151
except TypeError:
150152
# Return valid json for unserializable objects
@@ -158,6 +160,8 @@ class YamlOutputter(Outputter):
158160
supports = "yaml"
159161

160162
def __call__(self, data, **kwargs):
163+
if kwargs.has_key('color'):
164+
kwargs.pop('color')
161165
print yaml.dump(data, **kwargs)
162166

163167
def get_outputter(name=None):

0 commit comments

Comments
 (0)