mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-19 22:22:00 +00:00
Merge remote-tracking branch 'upstream/master' into fix25
This commit is contained in:
commit
5882c50360
@ -16,7 +16,10 @@ from subprocess import CalledProcessError
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from time import sleep
|
from time import sleep
|
||||||
from errno import ESRCH
|
from errno import ESRCH
|
||||||
import termcolor
|
try:
|
||||||
|
import termcolor
|
||||||
|
except ImportError:
|
||||||
|
termcolor = None
|
||||||
from random import random
|
from random import random
|
||||||
import commands
|
import commands
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
@ -93,7 +96,7 @@ def get_server_pid(server_tcp_port):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
def colored(text, args, color=None, on_color=None, attrs=None):
|
def colored(text, args, color=None, on_color=None, attrs=None):
|
||||||
if sys.stdout.isatty() or args.force_color:
|
if termcolor and (sys.stdout.isatty() or args.force_color):
|
||||||
return termcolor.colored(text, color, on_color, attrs)
|
return termcolor.colored(text, color, on_color, attrs)
|
||||||
else:
|
else:
|
||||||
return text
|
return text
|
||||||
|
Loading…
Reference in New Issue
Block a user