Remove APIMethod.retry_errors
authorHarmon <Harmon758@gmail.com>
Fri, 29 Jan 2021 01:39:33 +0000 (19:39 -0600)
committerHarmon <Harmon758@gmail.com>
Fri, 29 Jan 2021 01:39:33 +0000 (19:39 -0600)
tweepy/binder.py

index 08e8590c42e86d2bde3c4b4f6f2516eb55b9b324..11e51e57e67c1d536dc44fcbd81aa8507bc1f6f4 100644 (file)
@@ -39,8 +39,6 @@ class APIMethod:
 
         self.post_data = kwargs.pop('post_data', None)
         self.json_payload = kwargs.pop('json_payload', None)
-        self.retry_errors = kwargs.pop('retry_errors',
-                                        api.retry_errors)
         self.wait_on_rate_limit = kwargs.pop('wait_on_rate_limit',
                                                 api.wait_on_rate_limit)
         self.wait_on_rate_limit_notify = kwargs.pop('wait_on_rate_limit_notify',
@@ -180,7 +178,7 @@ class APIMethod:
                     continue
                 if 'retry-after' in resp.headers:
                     retry_delay = float(resp.headers['retry-after'])
-            elif self.retry_errors and resp.status_code not in self.retry_errors:
+            elif self.api.retry_errors and resp.status_code not in self.api.retry_errors:
                 # Exit request loop if non-retry error code
                 break