Skip to content

Commit

Permalink
colorize_status can be true, false, or "auto"
Browse files Browse the repository at this point in the history
  • Loading branch information
msabramo committed Dec 3, 2014
1 parent 347190f commit ff764a9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion supervisor/supervisorctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
from supervisor.compat import unicode
from supervisor.compat import raw_input

from supervisor.datatypes import boolean

from supervisor.medusa import asyncore_25 as asyncore

from supervisor.options import ClientOptions
Expand Down Expand Up @@ -639,7 +641,10 @@ def do_status(self, arg):
supervisor = self.ctl.get_supervisor()
all_infos = supervisor.getAllProcessInfo()
options = self.ctl.options
colorize_output = options.colorize_status
if options.colorize_status == 'auto':
colorize_output = sys.stdout.isatty()
else:
colorize_output = boolean(options.colorize_status)

args = arg.split()

Expand Down

0 comments on commit ff764a9

Please sign in to comment.