mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
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:
parent
b2a6a8feb8
commit
eb3710c164
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user