From a644e4bc41b0dc37893e90d9b8042026d41a9449 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 27 Nov 2012 15:06:17 -0500 Subject: [PATCH] get_updates: Replace "failures" with the new dont_block option. (imported from commit 2b4ecb35c4f14b6c408323662ef6f39c6485c62d) --- common.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/common.py b/common.py index 0171480..095b790 100644 --- a/common.py +++ b/common.py @@ -63,8 +63,6 @@ class HumbugAPI(object): 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, @@ -76,7 +74,7 @@ class HumbugAPI(object): if not had_error_retry: sys.stdout.write("connection error %s -- retrying." % (res.status_code,)) had_error_retry = True - request["failures"] += 1 + request["dont_block"] = simplejson.dumps(True) else: sys.stdout.write(".") sys.stdout.flush() @@ -102,7 +100,7 @@ class HumbugAPI(object): if not had_error_retry: sys.stdout.write("connection error -- retrying.") had_error_retry = True - request["failures"] += 1 + request["dont_block"] = simplejson.dumps(True) else: sys.stdout.write(".") sys.stdout.flush()