[libcamera-devel] [PATCH 04/10] utils: raspberrypi: ctt: json_pretty_print: Make test output to stdout
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Fri Jul 3 02:14:16 CEST 2020
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 at ideasonboard.com>
---
utils/raspberrypi/ctt/ctt_pretty_print_json.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/utils/raspberrypi/ctt/ctt_pretty_print_json.py b/utils/raspberrypi/ctt/ctt_pretty_print_json.py
index 703a23fe25db..3de8c108f01c 100644
--- a/utils/raspberrypi/ctt/ctt_pretty_print_json.py
+++ b/utils/raspberrypi/ctt/ctt_pretty_print_json.py
@@ -89,4 +89,5 @@ if __name__ == '__main__':
input_filename = sys.argv[1]
with open(input_filename, "r") as fin:
- pretty_print_json(fin.read(), "pretty.json")
+ printer = JSONPrettyPrinter(sys.stdout)
+ printer.print(fin.read())
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list