mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
dd7682dd12
The tests/cputestdata/cpu-parse.sh would produce JSON files with QEMU replies which wouldn't pass syntax-check. Let's fix this by not emitting an extra new line after reformatting the JSON file. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
10 lines
190 B
Python
Executable File
10 lines
190 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import sys
|
|
import json
|
|
|
|
dec = json.JSONDecoder()
|
|
data, pos = dec.raw_decode(sys.stdin.read())
|
|
json.dump(data, sys.stdout, indent=2, separators=(',', ': '))
|
|
print("")
|