Do not polute logs in clickhouse-test

In case of there are less then 100 lines, there is no need to split
lines with '#', and in fact, it will only looks it odd and hard to
interpret.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
Azat Khuzhin 2023-02-13 16:46:56 +01:00
parent 95db6fb1a6
commit 72f61ae399

View File

@ -76,7 +76,10 @@ def trim_for_log(s):
if not s:
return s
lines = s.splitlines()
return "\n".join(lines[:50] + ["#" * 100] + lines[-50:])
if len(lines) > 100:
return "\n".join(lines[:50] + ["#" * 100] + lines[-50:])
else:
return "\n".join(lines)
class HTTPError(Exception):