From 00aebec90d349dff6ce9b27adb633b595f6d7731 Mon Sep 17 00:00:00 2001 From: Allen Porter Date: Tue, 9 Feb 2021 21:59:49 -0800 Subject: [PATCH] Fix bug in test found by manual log inspection (#46309) --- tests/components/stream/conftest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/components/stream/conftest.py b/tests/components/stream/conftest.py index 75ac9377b7c..1b017667ee6 100644 --- a/tests/components/stream/conftest.py +++ b/tests/components/stream/conftest.py @@ -40,7 +40,8 @@ class WorkerSync: # Block the worker thread until the test has a chance to verify # the segments under test. logging.debug("blocking worker") - self._event.wait() + if self._event: + self._event.wait() # Forward to actual implementation self._original(stream)