Skip to content

Commit

Permalink
fix(clp-package): Remove faulty error handling for parsing archive co…
Browse files Browse the repository at this point in the history
…mpression stats. (#640)
  • Loading branch information
haiqi96 authored Dec 19, 2024
1 parent 37263eb commit a6b6222
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,16 +243,13 @@ def run_clp(
# Handle job metadata update and s3 write if enabled
s3_error = None
while not last_line_decoded:
line = proc.stdout.readline()
stats: Optional[Dict[str, Any]] = None
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:
line = proc.stdout.readline()
if not line:
last_line_decoded = True
else:
stats = json.loads(line.decode("ascii"))

if last_archive_stats is not None and (
None is stats or stats["id"] != last_archive_stats["id"]
Expand Down

0 comments on commit a6b6222

Please sign in to comment.