From 21913529480d2760dedb883351a011502dceffb9 Mon Sep 17 00:00:00 2001 From: Marco Montagna Date: Tue, 6 Nov 2018 22:16:27 -0800 Subject: [PATCH] Make Stream accept a daemon option. --- tweepy/streaming.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() -- 2.25.1