From: Marco Montagna Date: Wed, 7 Nov 2018 06:16:27 +0000 (-0800) Subject: Make Stream accept a daemon option. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=21913529480d2760dedb883351a011502dceffb9;p=tweepy.git Make Stream accept a daemon option. --- diff --git a/tweepy/streaming.py b/tweepy/streaming.py index 68d3f86..7cd355d 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -195,6 +195,7 @@ class Stream(object): self.auth = auth self.listener = listener self.running = False + self.daemon = options.get("daemon", False) self.timeout = options.get("timeout", 300.0) self.retry_count = options.get("retry_count") # values according to @@ -364,7 +365,7 @@ class Stream(object): self.running = True if is_async: self._thread = Thread(target=self._run) - self._thread.daemon = True + self._thread.daemon = self.daemon self._thread.start() else: self._run()