From 9824ac763cb85c9c5195fb4356f9295f8dbdfcfa Mon Sep 17 00:00:00 2001 From: Sergey Serebryakov Date: Fri, 18 Aug 2023 14:50:37 +0000 Subject: [PATCH] Printinf new line only when output is sys.stdout. --- mlcube/mlcube/__main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mlcube/mlcube/__main__.py b/mlcube/mlcube/__main__.py index 317afce..cce4b76 100644 --- a/mlcube/mlcube/__main__.py +++ b/mlcube/mlcube/__main__.py @@ -704,7 +704,8 @@ def inspect( import json json.dump(info, output_stream) - print() # json doesn't print a newline + if output_stream == sys.stdout: + print() # json doesn't print a newline else: import yaml