From abf4d5d4dfa117b39bfcdc992895574df7e5ee8b Mon Sep 17 00:00:00 2001 From: Harmon Date: Mon, 4 Jan 2021 04:11:22 -0600 Subject: [PATCH] Rename StreamListener.keep_alive to StreamListener.on_keep_alive To be consistent with other StreamListener methods --- tweepy/streaming.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tweepy/streaming.py b/tweepy/streaming.py index 062a274..bcd7331 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -66,7 +66,7 @@ class StreamListener: log.error("Unknown message type: %s", raw_data) - def keep_alive(self): + def on_keep_alive(self): """Called when a keep-alive arrived""" return @@ -289,7 +289,7 @@ class Stream: line = buf.read_line() stripped_line = line.strip() if line else line # line is sometimes None so we need to check here if not stripped_line: - self.listener.keep_alive() # keep-alive new lines are expected + self.listener.on_keep_alive() # keep-alive new lines are expected elif stripped_line.isdigit(): length = int(stripped_line) break -- 2.25.1