From: Harmon Date: Mon, 4 Jan 2021 10:11:22 +0000 (-0600) Subject: Rename StreamListener.keep_alive to StreamListener.on_keep_alive X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=abf4d5d4dfa117b39bfcdc992895574df7e5ee8b;p=tweepy.git Rename StreamListener.keep_alive to StreamListener.on_keep_alive To be consistent with other StreamListener methods --- 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