From a4500950d3082e08705ff262518e1d6ae1b04ded Mon Sep 17 00:00:00 2001 From: Harmon Date: Mon, 4 Jan 2021 03:42:09 -0600 Subject: [PATCH] Improve variable name in Stream --- tweepy/streaming.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tweepy/streaming.py b/tweepy/streaming.py index 0907c88..062a274 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -296,9 +296,9 @@ class Stream: else: raise TweepError('Expecting length, unexpected value found') - next_status_obj = buf.read_len(length) - if self.running and next_status_obj: - if self.listener.on_data(next_status_obj) is False: + data = buf.read_len(length) + if self.running and data: + if self.listener.on_data(data) is False: self.running = False # # Note: keep-alive newlines might be inserted before each length value. @@ -322,9 +322,9 @@ class Stream: # # read the next twitter status object # if delimited_string.decode('utf-8').strip().isdigit(): # status_id = int(delimited_string) - # next_status_obj = resp.raw.read(status_id) + # data = resp.raw.read(status_id) # if self.running: - # if self.listener.on_data(next_status_obj.decode('utf-8')) is False: + # if self.listener.on_data(data.decode('utf-8')) is False: # self.running = False if resp.raw.closed: -- 2.25.1