Update stream integration for Python 3.9 which removed isAlive from threading in favor of is_alive (#42051)

Python 3.9 compact
This commit is contained in:
Colin Robbins 2020-10-19 04:42:50 +01:00 committed by GitHub
parent 33f0bf4c4a
commit 6f8e3d2544
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -171,7 +171,7 @@ class Stream:
# pylint: disable=import-outside-toplevel
from .worker import stream_worker
if self._thread is None or not self._thread.isAlive():
if self._thread is None or not self._thread.is_alive():
if self._thread is not None:
# The thread must have crashed/exited. Join to clean up the
# previous thread.