From 6e5aad5ed4164528fb3e6862539b294fdc21471a Mon Sep 17 00:00:00 2001 From: Haiqi Xu <14502009+haiqi96@users.noreply.github.com> Date: Wed, 18 Dec 2024 12:52:11 -0500 Subject: [PATCH] adding safeguard for empty stdout line from clp. --- .../executor/compress/fs_compression_task.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/job-orchestration/job_orchestration/executor/compress/fs_compression_task.py b/components/job-orchestration/job_orchestration/executor/compress/fs_compression_task.py index d140d3777..fdd05263b 100644 --- a/components/job-orchestration/job_orchestration/executor/compress/fs_compression_task.py +++ b/components/job-orchestration/job_orchestration/executor/compress/fs_compression_task.py @@ -245,7 +245,11 @@ def run_clp( while not last_line_decoded: line = proc.stdout.readline() stats: Optional[Dict[str, Any]] = None - if line: + if "" == line: + # Skip empty lines that could be caused by potential errors in printing archive stats + continue + + if line is not None: stats = json.loads(line.decode("ascii")) else: last_line_decoded = True