format stdout a bit better

pull/23/head
Andrew de Quincey 2021-05-18 01:20:19 +01:00
rodzic 2dfb4ed61e
commit 9137834b41
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -85,7 +85,7 @@ def logger(hostname, csvfile, noprofilestats, pidstats, stdout):
for k in list(msg.keys()):
v = msg[k]
if isinstance(v, float):
msg[k] = round(v, 3)
msg[k] = '{:5.3f}'.format(v)
csv_stdout.writerow(msg)
sys.stdout.flush()