Нормализовать сохранённые логи проверок

This commit is contained in:
Алиса Шурман
2026-11-12 23:02:24 +03:00
parent 59fc7b96ec
commit c8e1ef46d3
7 changed files with 53 additions and 52 deletions
+1
View File
@@ -16,6 +16,7 @@ def run(name, args, stdin=None):
fields = ('Service', 'ID', 'Image', 'State', 'Health', 'Status', 'Ports')
output = '\n'.join(json.dumps({key: row.get(key) for key in fields})
for row in map(json.loads, output.splitlines())) + '\n'
output = '\n'.join(line.rstrip() for line in output.splitlines()) + '\n'
(root/'evidence'/name).write_text(output)
print(output,end='')
if result.returncode: