mirror of
https://github.com/samba-team/samba.git
synced 2025-07-30 19:42:05 +03:00
samba-tool visualize: respect $NO_COLOR
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
This commit is contained in:
committed by
Douglas Bagnall
parent
e7d78400bd
commit
6ced3d2151
@ -158,6 +158,8 @@ class GraphCommand(Command):
|
||||
return None
|
||||
|
||||
if color == 'auto':
|
||||
if os.environ.get('NO_COLOR'):
|
||||
return None
|
||||
if isinstance(output, str) and output != '-':
|
||||
return None
|
||||
if not hasattr(self.outf, 'isatty'):
|
||||
|
Reference in New Issue
Block a user