From: Aaron Hill Date: Fri, 18 Apr 2014 20:10:41 +0000 (-0400) Subject: Check against self._remaining_calls, not rem_calls X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=295552ce651fe4e4a4841fed1080ac8d06a15c96;p=tweepy.git Check against self._remaining_calls, not rem_calls --- diff --git a/tweepy/binder.py b/tweepy/binder.py index 8aac870..f47998d 100644 --- a/tweepy/binder.py +++ b/tweepy/binder.py @@ -176,7 +176,7 @@ def bind_api(**config): reset_time = resp.getheader('x-rate-limit-reset') if reset_time is not None: self._reset_time = int(reset_time) - if self.wait_on_rate_limit and rem_calls == 0 and (resp.status == 429 or resp.status == 420): # if ran out of calls before waiting switching retry last call + if self.wait_on_rate_limit and self._remaining_calls == 0 and (resp.status == 429 or resp.status == 420): # if ran out of calls before waiting switching retry last call continue retry_delay = self.retry_delay