clickhouse-test: Fix run without server config

This commit is contained in:
proller 2018-03-27 18:08:01 +03:00
parent 03b01fc249
commit 348b7c3bda

View File

@ -81,9 +81,12 @@ def main(args):
# TODO ! use clickhouse-extract-from-config here:
if args.zookeeper is None:
code, out = commands.getstatusoutput(args.binary + "-extract-from-config --try --config " + args.configserver + ' --key zookeeper | grep . | wc -l')
if int(out) > 0:
args.zookeeper = True
else:
try:
if int(out) > 0:
args.zookeeper = True
else:
args.zookeeper = False
except ValueError:
args.zookeeper = False
if args.shard is None: