summaryrefslogtreecommitdiff
path: root/testing/tools
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-06-22 19:15:35 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-22 19:15:35 +0000
commitb59b36610e39975a31b257c6e3d628d1b81eb90a (patch)
treea0fe52b1576d2c8d3e413ed2de60477e554f81f1 /testing/tools
parent8b8031dc46c892e3cb67535f2540bb863648ed3b (diff)
downloadpdfium-b59b36610e39975a31b257c6e3d628d1b81eb90a.tar.xz
Fix some nits in gold.py.chromium/3470
Change-Id: Idfc1c2282cc9318d1135f360ff03d99e27105127 Reviewed-on: https://pdfium-review.googlesource.com/35910 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'testing/tools')
-rw-r--r--testing/tools/gold.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/testing/tools/gold.py b/testing/tools/gold.py
index 445102fef3..86aea746a0 100644
--- a/testing/tools/gold.py
+++ b/testing/tools/gold.py
@@ -74,13 +74,13 @@ class GoldBaseline(object):
try:
response = urllib2.urlopen(url, timeout=2)
c_type = response.headers.get('Content-type', '')
- if c_type != 'application/json':
+ EXPECTED_CONTENT_TYPE = 'application/json'
+ if c_type != EXPECTED_CONTENT_TYPE:
raise ValueError('Invalid content type. Got %s instead of %s' % (
- c_type, 'application/json'))
+ c_type, EXPECTED_CONTENT_TYPE))
json_data = response.read()
except (urllib2.HTTPError, urllib2.URLError) as e:
- print ('Error: Unable to read skia gold json from %s: %s'
- % (url, e))
+ print ('Error: Unable to read skia gold json from %s: %s' % (url, e))
return None
try: