Skip to content

Commit

Permalink
✨ add exception condition
Browse files Browse the repository at this point in the history
  • Loading branch information
MeditationDuck committed Sep 10, 2024
1 parent 027a408 commit 5c2fd55
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions wake/testing/pytest_plugin_multiprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
)
from wake.testing.coverage import CoverageHandler
from wake.utils.tee import StderrTee, StdoutTee
import websocket


class PytestWakePluginMultiprocess:
Expand Down Expand Up @@ -86,6 +87,15 @@ def _exception_handler(
e: Optional[BaseException],
tb: Optional[TracebackType],
) -> None:
ignored_exceptions = (
websocket._exceptions.WebSocketConnectionClosedException,
ConnectionResetError,
BrokenPipeError,
KeyboardInterrupt
)
if e_type in ignored_exceptions:
return

self._cleanup_stdio()
self._exception_handled = True

Expand Down

0 comments on commit 5c2fd55

Please sign in to comment.