api: Fix type error updating the failures count.
(imported from commit 5733f252f676549ff817df3a7560274ecec0cd2a)
This commit is contained in:
parent
7514390190
commit
dcfcbadf89
|
@ -26,12 +26,13 @@ class HumbugAPI():
|
||||||
request["email"] = self.email
|
request["email"] = self.email
|
||||||
request["api-key"] = self.api_key
|
request["api-key"] = self.api_key
|
||||||
request["client"] = self.client_name
|
request["client"] = self.client_name
|
||||||
request["failures"] = 0
|
|
||||||
|
|
||||||
for (key, val) in request.iteritems():
|
for (key, val) in request.iteritems():
|
||||||
if not (isinstance(val, str) or isinstance(val, unicode)):
|
if not (isinstance(val, str) or isinstance(val, unicode)):
|
||||||
request[key] = simplejson.dumps(val)
|
request[key] = simplejson.dumps(val)
|
||||||
|
|
||||||
|
request["failures"] = 0
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
res = requests.post(urlparse.urljoin(self.base_url, url), data=request,
|
res = requests.post(urlparse.urljoin(self.base_url, url), data=request,
|
||||||
|
|
Loading…
Reference in a new issue