utils: raspberrypi: ctt: json_pretty_print: Make test output to stdout
The standalone test mode output to a file name "pretty.json". To make the test mode more versatile, output to stdout instead. The user can then decide how to use the output. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Tested-by: David Plowman <david.plowman@raspberrypi.com>
This commit is contained in:
parent
4321f6e96e
commit
5224f471ca
1 changed files with 2 additions and 1 deletions
|
@ -89,4 +89,5 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
input_filename = sys.argv[1]
|
input_filename = sys.argv[1]
|
||||||
with open(input_filename, "r") as fin:
|
with open(input_filename, "r") as fin:
|
||||||
pretty_print_json(fin.read(), "pretty.json")
|
printer = JSONPrettyPrinter(sys.stdout)
|
||||||
|
printer.print(fin.read())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue