From 02d910243d5cfa4d2a647e6b1d1fc3cf90ba7173 Mon Sep 17 00:00:00 2001 From: Benjamin G Date: Wed, 3 Aug 2016 22:45:03 +0200 Subject: [PATCH] Fix #2442 - should_retry_throttle isn't defined (#2461) * Fix #2442 Variables weren't correctly defined * Fix typo --- pokemongo_bot/api_wrapper.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pokemongo_bot/api_wrapper.py b/pokemongo_bot/api_wrapper.py index a3f70aed1f..17612aceb6 100644 --- a/pokemongo_bot/api_wrapper.py +++ b/pokemongo_bot/api_wrapper.py @@ -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: @@ -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)