diff --git a/common.py b/common.py index 465f48e..56040f0 100644 --- a/common.py +++ b/common.py @@ -26,12 +26,13 @@ class HumbugAPI(): request["email"] = self.email request["api-key"] = self.api_key request["client"] = self.client_name - request["failures"] = 0 for (key, val) in request.iteritems(): if not (isinstance(val, str) or isinstance(val, unicode)): request[key] = simplejson.dumps(val) + request["failures"] = 0 + while True: try: res = requests.post(urlparse.urljoin(self.base_url, url), data=request,