From: Harmon Date: Thu, 21 Jan 2021 01:41:34 +0000 (-0600) Subject: Rename StreamListener.on_error to on_request_error X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fe3bb8bbbea880b4629206a7d542f71a96991e30;p=tweepy.git Rename StreamListener.on_error to on_request_error --- diff --git a/tweepy/streaming.py b/tweepy/streaming.py index 7104000..10012c2 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -86,7 +86,7 @@ class StreamListener: """Called when a limitation notice arrives""" return - def on_error(self, status_code): + def on_request_error(self, status_code): """Called when a non-200 status code is returned""" return False @@ -233,7 +233,7 @@ class Stream: verify=self.verify, proxies=self.proxies) if resp.status_code != 200: - if self.listener.on_error(resp.status_code) is False: + if self.listener.on_request_error(resp.status_code) is False: break error_counter += 1 if resp.status_code == 420: