Fix AttributeError
authorPrabeesh K <prabsmails@gmail.com>
Thu, 9 Oct 2014 06:31:58 +0000 (10:31 +0400)
committerPrabeesh K <prabsmails@gmail.com>
Thu, 9 Oct 2014 06:31:58 +0000 (10:31 +0400)
AttributeError: 'Response' object has no attribute 'status'

tweepy/binder.py

index ed4b7846708826ef63d998f20f3b255bf1f0f907..960e272681ac6e45ddd90d13171c3f893417bf97 100644 (file)
@@ -178,7 +178,7 @@ def bind_api(**config):
                     self._reset_time = int(reset_time)
                 if self.wait_on_rate_limit and self._remaining_calls == 0 and (
                         # if ran out of calls before waiting switching retry last call
-                        resp.status == 429 or resp.status == 420):
+                        resp.status_code == 429 or resp.status_code == 420):
                     continue
                 retry_delay = self.retry_delay
                 # Exit request loop if non-retry error code