From ceecb1dc19379b5a8559b41b1c3e0f4d5336c32e Mon Sep 17 00:00:00 2001 From: Harmon Date: Thu, 28 Jan 2021 19:41:17 -0600 Subject: [PATCH] Remove APIMethod.wait_on_rate_limit_notify --- tweepy/binder.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tweepy/binder.py b/tweepy/binder.py index 7b246e4..d2cfeac 100644 --- a/tweepy/binder.py +++ b/tweepy/binder.py @@ -39,8 +39,6 @@ class APIMethod: self.post_data = kwargs.pop('post_data', None) self.json_payload = kwargs.pop('json_payload', None) - self.wait_on_rate_limit_notify = kwargs.pop('wait_on_rate_limit_notify', - api.wait_on_rate_limit_notify) self.return_cursors = kwargs.pop('return_cursors', False) self.parser = kwargs.pop('parser', api.parser) self.headers = kwargs.pop('headers', {}) @@ -134,7 +132,7 @@ class APIMethod: # Handle running out of API calls sleep_time = self._reset_time - int(time.time()) if sleep_time > 0: - if self.wait_on_rate_limit_notify: + if self.api.wait_on_rate_limit_notify: log.warning(f"Rate limit reached. Sleeping for: {sleep_time}") time.sleep(sleep_time + 1) # Sleep for extra sec -- 2.25.1