提交 9d62af72 编写于 作者: J Jiri Denemark

cputest: Avoid calling json_reformat in cpu-parse.sh

Various version of json_reformat use different number of spaces for
indenting. Let's use a simple python reformatter to gain full control
over the formatting for consistent results.
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 0d88c25f
......@@ -42,7 +42,7 @@ json()
while read; do
$first || echo
first=false
json_reformat <<<"$REPLY" | tr -s '\n'
$(dirname $0)/cpu-reformat.py <<<"$REPLY"
done
}
......
#!/usr/bin/env python2
import sys
import json
dec = json.JSONDecoder()
data, pos = dec.raw_decode(sys.stdin.read())
json.dump(data, sys.stdout, indent = 2, separators = (',', ': '))
print
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册