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
This commit is contained in:
Robert Collins 2018-02-23 12:28:16 +13:00
parent 45e8402f31
commit c72df1cde8
1 changed files with 1 additions and 0 deletions

View File

@ -1496,6 +1496,7 @@ class Sync(object):
except Exception: except Exception:
self.log.exception("Unable to parse result %s from post to %s" % self.log.exception("Unable to parse result %s from post to %s" %
(r.text, url)) (r.text, url))
raise
return ret return ret
def put(self, path, data): def put(self, path, data):