1
0
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:
Douglas Bagnall
2022-08-17 11:51:40 +12:00
committed by Douglas Bagnall
parent e7d78400bd
commit 6ced3d2151
2 changed files with 2 additions and 1 deletions

View File

@ -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'):