mirror of
https://github.com/searxng/searxng.git
synced 2024-11-22 12:10:11 +01:00
[fix] do not colorize output on dumb terminals
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
ca0889d488
commit
9c581466e1
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user