From: Douglas Bagnall Date: Tue, 16 Aug 2022 23:57:00 +0000 (+1200) Subject: samba-tool visualize: remove py2 compat for colour calculations X-Git-Tag: talloc-2.4.0~1193 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6160e956b5931a2cbeb98e042c2fe71981115ba0;p=thirdparty%2Fsamba.git samba-tool visualize: remove py2 compat for colour calculations io.StringIO has .isatty(); the old cStringIO did not, Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett Reviewed-by: Joseph Sutton --- diff --git a/python/samba/netcmd/visualize.py b/python/samba/netcmd/visualize.py index 71965799b44..49e64794131 100644 --- a/python/samba/netcmd/visualize.py +++ b/python/samba/netcmd/visualize.py @@ -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