Skip to content

Commit 3bc6d54

Browse files
fix: catch Exception instead of BaseException in stdout writer thread
Co-Authored-By: unknown <>
1 parent 26fbbee commit 3bc6d54

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

airbyte_cdk/entrypoint.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ def _buffered_write_to_stdout(messages: Iterable[str]) -> None:
401401
"""
402402
_SENTINEL = None # signals the writer to stop
403403
buffer: Queue[Optional[str]] = Queue(maxsize=_STDOUT_WRITER_QUEUE_SIZE)
404-
writer_error: List[BaseException] = []
404+
writer_error: List[Exception] = []
405405

406406
def _writer() -> None:
407407
try:
@@ -412,7 +412,7 @@ def _writer() -> None:
412412
# Adding `\n` to the message ensures both the payload and
413413
# the line break are printed in a single write call.
414414
print(f"{item}\n", end="")
415-
except BaseException as exc:
415+
except Exception as exc:
416416
writer_error.append(exc)
417417

418418
writer_thread = threading.Thread(target=_writer, daemon=True, name="stdout-writer")

0 commit comments

Comments
 (0)