summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Doan <andy.doan@linaro.org>2015-08-24 11:39:30 -0500
committerAndy Doan <andy.doan@linaro.org>2015-08-24 11:39:30 -0500
commitb94294445d8392ff0027b6b0c78998b0099a857b (patch)
tree5feb9da0d244bf7ff75a1e15576158d8c890a956
parent976699c51a86eebf778240fbb51f52fc90b5e4ed (diff)
gerrit started working right - now we don't
We've always claimed in our gerrit requests to accept gzip data. However we don't actually have any logic to deal with it. Over the weekend Gerrit finally started honoring our header and now we get error email like: Traceback (most recent call last): File "/srv/patches.linaro.org/apps/patchmetrics/bin/sync-gerrit-changes.py", line 30, in <module> if ("Error in operator owner:%s" % user_email) in str(e): UnicodeDecodeError: 'ascii' codec can't decode byte 0x8b in position 1: ordinal not in range(128) Change-Id: Icf76acd023cb0411af8f2929abf59bd83b20f34a
-rw-r--r--apps/patchmetrics/gerrit.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/apps/patchmetrics/gerrit.py b/apps/patchmetrics/gerrit.py
index 0713dae..0929f0c 100644
--- a/apps/patchmetrics/gerrit.py
+++ b/apps/patchmetrics/gerrit.py
@@ -142,7 +142,6 @@ def gerrit_request(request_url):
# https://groups.google.com/group/repo-discuss/msg/78e70b07ad1aacce
# https://gerrit-review.googlesource.com/Documentation/rest-api.html
request.add_header("Accept", "application/json")
- request.add_header("Accept-Encoding", "gzip")
# The request in this case needs to be a GET.
json_string = sanitize_json_response(urllib2.urlopen(request).read())
json_object = json.loads(json_string)