From 9c581466e136f7cb82d5ffe6c052fbd9e93ab39f Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Wed, 30 Dec 2020 15:24:29 +0100 Subject: [PATCH] [fix] do not colorize output on dumb terminals Signed-off-by: Markus Heiser --- searx/search/checker/__main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/searx/search/checker/__main__.py b/searx/search/checker/__main__.py index c071e6437..2f808237a 100644 --- a/searx/search/checker/__main__.py +++ b/searx/search/checker/__main__.py @@ -1,11 +1,12 @@ import sys +import os import searx.search import searx.search.processors import searx.search.checker -if sys.stdout.isatty(): +if sys.stdout.isatty() and os.environ.get('TERM') not in ['dumb', 'unknown']: RESET_SEQ = "\033[0m" COLOR_SEQ = "\033[1;%dm" BOLD_SEQ = "\033[1m"