diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2020-12-30 15:24:29 +0100 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2021-01-12 11:47:17 +0100 |
commit | 9c581466e136f7cb82d5ffe6c052fbd9e93ab39f (patch) | |
tree | 7035c64def026438597ba2421b29079ffa6c8b30 /searx/search | |
parent | ca0889d488d232d357baacc8f16320c74333092c (diff) | |
download | searxng-9c581466e136f7cb82d5ffe6c052fbd9e93ab39f.tar.gz searxng-9c581466e136f7cb82d5ffe6c052fbd9e93ab39f.zip |
[fix] do not colorize output on dumb terminals
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/search')
-rw-r--r-- | searx/search/checker/__main__.py | 3 |
1 files changed, 2 insertions, 1 deletions
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" |