From 9e3c71780a29f911752c0bffa985c70055f1c053 Mon Sep 17 00:00:00 2001 From: David Kranz Date: Wed, 9 Oct 2013 21:45:31 -0400 Subject: [PATCH] Accept gzip files in find_stack_traces.py The server response seems to have changed since this code was originally written. Change-Id: Icffc062ce46f59b678fe468560d198567286fe67 --- tools/find_stack_traces.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/find_stack_traces.py b/tools/find_stack_traces.py index 0ce1500b47..52a5a666eb 100755 --- a/tools/find_stack_traces.py +++ b/tools/find_stack_traces.py @@ -65,7 +65,9 @@ class StackTrace(object): def hunt_for_stacktrace(url): """Return TRACE or ERROR lines out of logs.""" - page = urllib2.urlopen(url) + req = urllib2.Request(url) + req.add_header('Accept-Encoding', 'gzip') + page = urllib2.urlopen(req) buf = StringIO.StringIO(page.read()) f = gzip.GzipFile(fileobj=buf) content = f.read()