diff options
| author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2022-09-09 14:48:29 +1200 |
|---|---|---|
| committer | Andrew Bartlett <abartlet@samba.org> | 2022-09-16 05:46:36 +0000 |
| commit | 5dd4696fb792cff37534eccb943be66cdd9e544c (patch) | |
| tree | db275442e338c53c1aa5aa38aa7bf07cd25f3d63 /python/samba/netcmd/visualize.py | |
| parent | 4c623356ce547ea2dd4d9055ef9162f227d4cabd (diff) | |
| download | samba-5dd4696fb792cff37534eccb943be66cdd9e544c.tar.gz samba-5dd4696fb792cff37534eccb943be66cdd9e544c.tar.bz2 samba-5dd4696fb792cff37534eccb943be66cdd9e544c.zip | |
samba-tool: make --color a general option
We don't put --color into options.SambaOptions because we can't handle
the 'auto' case in the options module without knowing whether or not
self.outf is a tty, and a) this might not be resolved and b) is fiddly
to pass through.
The .use_colour class flag allows samba-tool subcommands to avoid having
--color, and is *also* useful in the short term for visualise and drs
commands to avoid having this --color clobber their own bespoke versions
(temporarily, during the transition).
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python/samba/netcmd/visualize.py')
| -rw-r--r-- | python/samba/netcmd/visualize.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/python/samba/netcmd/visualize.py b/python/samba/netcmd/visualize.py index ea8e696ee61..325cb14e46c 100644 --- a/python/samba/netcmd/visualize.py +++ b/python/samba/netcmd/visualize.py @@ -92,6 +92,7 @@ class GraphCommand(Command): } takes_options = COMMON_OPTIONS + DOT_OPTIONS takes_args = () + use_colour = False def get_db(self, H, sambaopts, credopts): lp = sambaopts.get_loadparm() |
