Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mrDoctorWho/vk4xmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Smith <mrdoctorwho@helldev.net>2019-01-03 07:36:46 +0300
committerJohn Smith <mrdoctorwho@helldev.net>2019-01-03 07:36:46 +0300
commit137e36b111f77e653b4eb09314d77f902a7c57cc (patch)
treebb232f28c0eae762be0e788d4c64557b08bf2fc7 /library
parenta84c6f3d64a874dca61b414bb8502701bdd36099 (diff)
attempt to fix errors with not receiving user names
Diffstat (limited to 'library')
-rw-r--r--library/vkapi.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/vkapi.py b/library/vkapi.py
index 20ff06c..6c54116 100644
--- a/library/vkapi.py
+++ b/library/vkapi.py
@@ -53,7 +53,7 @@ except ImportError:
logger.warning("vkapi: ujson wasn't loaded, using simplejson instead")
-def attemptTo(maxRetries, resultType, *errors):
+def repeat(maxRetries, resultType, *errors):
"""
Tries to execute function ignoring specified errors specified number of
times and returns specified result type on try limit.
@@ -110,7 +110,7 @@ class AsyncHTTPRequest(httplib.HTTPSConnection):
self.headers = headers or {}
self.created = time.time()
- @attemptTo(REQUEST_RETRIES, None, *ERRORS)
+ @repeat(REQUEST_RETRIES, None, *ERRORS)
def open(self):
self.connect()
self.request(("POST" if self.data else "GET"), self.url, self.data,
@@ -193,7 +193,7 @@ class RequestProcessor(object):
request = urllib2.Request(url, data, headers)
return request
- @attemptTo(REQUEST_RETRIES, tuple, *ERRORS)
+ @repeat(REQUEST_RETRIES, tuple, *ERRORS)
def post(self, url, data=None, urlencode=True):
"""
POST request