Skip to content

Commit

Permalink
Rename StreamListener.on_error to on_request_error
Browse files Browse the repository at this point in the history
  • Loading branch information
Harmon758 committed Jan 21, 2021
1 parent 8f62297 commit fe3bb8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tweepy/streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def on_limit(self, track):
"""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

Expand Down Expand Up @@ -233,7 +233,7 @@ def _run(self):
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:
Expand Down

0 comments on commit fe3bb8b

Please sign in to comment.