Fix error message in clickhouse-test

{} was not replaced:

    Cannot get server pid with {}, got {}: {} lsof -i tcp:9000 -s tcp:LISTEN -Fp | awk '/^p[0-9]+$/{print substr($0, 2)}' b'306\n1025011\n' invalid literal for int() with base 10: b'306\n1025011\n'
This commit is contained in:
Azat Khuzhin 2021-03-13 08:39:08 +03:00
parent b2a6a8feb8
commit eb3710c164

View File

@ -245,11 +245,11 @@ def get_server_pid(server_tcp_port):
output = None
for cmd in commands:
try:
output = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
output = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True)
if output:
return int(output)
except Exception as e:
print("Cannot get server pid with {}, got {}: {}", cmd, output, e)
print("Cannot get server pid with {}, got {}: {}".format(cmd, output, e))
return None # most likely server dead