summaryrefslogtreecommitdiff
path: root/searx/search/checker
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2020-12-30 15:24:29 +0100
committerAlexandre Flament <alex@al-f.net>2021-01-12 11:47:17 +0100
commit9c581466e136f7cb82d5ffe6c052fbd9e93ab39f (patch)
tree7035c64def026438597ba2421b29079ffa6c8b30 /searx/search/checker
parentca0889d488d232d357baacc8f16320c74333092c (diff)
[fix] do not colorize output on dumb terminals
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/search/checker')
-rw-r--r--searx/search/checker/__main__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/searx/search/checker/__main__.py b/searx/search/checker/__main__.py
index c071e643..2f808237 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"