From: Harmon Date: Tue, 19 Jan 2021 09:41:55 +0000 (-0600) Subject: Rename StreamListener.on_timeout to on_connection_error X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8f622971f2a36f49ad54b70cf4f98464487a4716;p=tweepy.git Rename StreamListener.on_timeout to on_connection_error --- diff --git a/tweepy/streaming.py b/tweepy/streaming.py index 66ac999..7104000 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -90,8 +90,8 @@ class StreamListener: """Called when a non-200 status code is returned""" return False - def on_timeout(self): - """Called when stream connection times out""" + def on_connection_error(self): + """Called when stream connection errors or times out""" return def on_disconnect(self, notice): @@ -257,7 +257,7 @@ class Stream: if isinstance(exc, ssl.SSLError): if not (exc.args and 'timed out' in str(exc.args[0])): raise - if self.listener.on_timeout() is False: + if self.listener.on_connection_error() is False: break if self.running is False: break