Skip to content

Commit

Permalink
Fix #2442 - should_retry_throttle isn't defined (#2461)
Browse files Browse the repository at this point in the history
* Fix #2442

Variables weren't correctly defined

* Fix typo
  • Loading branch information
DayBr3ak authored and Max Kaplan committed Aug 3, 2016
1 parent 2f91fd0 commit 02d9102
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pokemongo_bot/api_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ def call(self, max_retry=15):
request_timestamp = self.throttle_sleep()
# self._call internally clear this field, so save it
self._req_method_list = [req_method for req_method in api_req_method_list]
should_throttle_retry = False
should_unexpected_response_retry = False
try:
result = self._call()
should_throttle_retry = False
should_unexpected_response_retry = False
except ServerSideRequestThrottlingException:
should_throttle_retry = True
except UnexpectedResponseException:
Expand All @@ -117,7 +117,7 @@ def call(self, max_retry=15):
continue # skip response checking

if should_unexpected_response_retry:
unexpected_reponse_retry += 1
unexpected_response_retry += 1
if unexpected_response_retry >= 5:
logger.log('Server is not responding correctly to our requests. Waiting for 30 seconds to reconnect.', 'red')
sleep(30)
Expand Down

0 comments on commit 02d9102

Please sign in to comment.