From: Douglas Bagnall Date: Fri, 9 Sep 2022 02:35:12 +0000 (+1200) Subject: py:colour: colour_if_wanted() returns the result X-Git-Tag: talloc-2.4.0~975 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c623356ce547ea2dd4d9055ef9162f227d4cabd;p=thirdparty%2Fsamba.git py:colour: colour_if_wanted() returns the result Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/colour.py b/python/samba/colour.py index 448b456b465..407930a8f34 100644 --- a/python/samba/colour.py +++ b/python/samba/colour.py @@ -122,7 +122,9 @@ def is_colour_wanted(stream, hint='auto'): def colour_if_wanted(stream, hint='auto'): - if is_colour_wanted(stream, hint): + wanted = is_colour_wanted(stream, hint) + if wanted: switch_colour_on() else: switch_colour_off() + return wanted