From fe3bb8bbbea880b4629206a7d542f71a96991e30 Mon Sep 17 00:00:00 2001 From: Harmon Date: Wed, 20 Jan 2021 19:41:34 -0600 Subject: [PATCH] Rename StreamListener.on_error to on_request_error --- tweepy/streaming.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: -- 2.25.1