From: Harmon Date: Fri, 22 Jan 2021 18:53:12 +0000 (-0600) Subject: Pass daemon directly when initializing Thread in Stream X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5107ae8dd16745dcd386a8903610d6518fde588b;p=tweepy.git Pass daemon directly when initializing Thread in Stream --- diff --git a/tweepy/streaming.py b/tweepy/streaming.py index 405f984..71a0a68 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -240,8 +240,8 @@ class Stream: def _start(self, threaded=False, *args, **kwargs): self.running = True if threaded: - self._thread = Thread(target=self._run, args=args, kwargs=kwargs) - self._thread.daemon = self.daemon + self._thread = Thread(target=self._run, args=args, kwargs=kwargs, + daemon=self.daemon) self._thread.start() else: self._run(*args, **kwargs)