summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Collins <robertc@vmware.com>2018-02-23 12:28:16 +1300
committerRobert Collins <robertc@vmware.com>2018-02-23 12:35:33 +1300
commitc72df1cde87b1706f8cc68dce80fd011543b155a (patch)
treea417e4039970fa061102b3558beacc9c7528d2e6
parent45e8402f31ab34087c91ede2387d1dc6c808ca91 (diff)
Don't lose sync requests that get bad responses
Gerrit servers under some configurations will return a result that doesn't fail in checkResponse but isn't JSON. When that happens the action being synced is discarded and lost. This has been the case for nearly 4 years as far as I can tell. Change-Id: I9f4c36cf50acefab4806e7617226c979465d384d
Notes
Notes (review): Code-Review+2: James E. Blair <corvus@inaugust.com> Workflow+1: James E. Blair <corvus@inaugust.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 02 Mar 2018 11:12:44 +0000 Reviewed-on: https://review.openstack.org/547168 Project: openstack/gertty Branch: refs/heads/master
-rw-r--r--gertty/sync.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/gertty/sync.py b/gertty/sync.py
index b504ece..52eb774 100644
--- a/gertty/sync.py
+++ b/gertty/sync.py
@@ -1496,6 +1496,7 @@ class Sync(object):
1496 except Exception: 1496 except Exception:
1497 self.log.exception("Unable to parse result %s from post to %s" % 1497 self.log.exception("Unable to parse result %s from post to %s" %
1498 (r.text, url)) 1498 (r.text, url))
1499 raise
1499 return ret 1500 return ret
1500 1501
1501 def put(self, path, data): 1502 def put(self, path, data):