From b59b36610e39975a31b257c6e3d628d1b81eb90a Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 22 Jun 2018 19:15:35 +0000 Subject: Fix some nits in gold.py. Change-Id: Idfc1c2282cc9318d1135f360ff03d99e27105127 Reviewed-on: https://pdfium-review.googlesource.com/35910 Commit-Queue: Ryan Harrison Reviewed-by: Ryan Harrison --- testing/tools/gold.py | 8 ++++---- 1 file 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: -- cgit v1.2.3