]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
samba-tool visualize: remove py2 compat for colour calculations
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Tue, 16 Aug 2022 23:57:00 +0000 (11:57 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Tue, 6 Sep 2022 21:12:36 +0000 (21:12 +0000)
io.StringIO has .isatty(); the old cStringIO did not,

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>
python/samba/netcmd/visualize.py

index 71965799b44558bc5e8fd0fe59962f32d2507f1d..49e64794131b828097c16bb5bd166e142ec8cf90 100644 (file)
@@ -162,9 +162,6 @@ class GraphCommand(Command):
                 return None
             if isinstance(output, str) and output != '-':
                 return None
-            if not hasattr(self.outf, 'isatty'):
-                # not a real file, perhaps cStringIO in testing
-                return None
             if not self.outf.isatty():
                 return None