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:
Laurent Pinchart 2020-07-03 01:43:57 +03:00
parent 4321f6e96e
commit 5224f471ca

View file

@ -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())