| Index: gm/rebaseline_server/imagepair.py
|
| diff --git a/gm/rebaseline_server/imagepair.py b/gm/rebaseline_server/imagepair.py
|
| index bba36fa8c4b4e47ab8101e1bcb580cba6095dee6..a79f3e4ef465fec706925c7fbbe43da66014e788 100644
|
| --- a/gm/rebaseline_server/imagepair.py
|
| +++ b/gm/rebaseline_server/imagepair.py
|
| @@ -12,6 +12,7 @@ ImagePair class (see class docstring for details)
|
| import posixpath
|
|
|
| # Keys used within ImagePair dictionary representations.
|
| +# Keep these in sync with static/constants.js
|
| KEY__DIFFERENCE_DATA = 'differenceData'
|
| KEY__EXPECTATIONS_DATA = 'expectations'
|
| KEY__EXTRA_COLUMN_VALUES = 'extraColumns'
|
| @@ -31,8 +32,10 @@ class ImagePair(object):
|
| Args:
|
| image_diff_db: ImageDiffDB instance we use to generate/store image diffs
|
| base_url: base of all image URLs
|
| - imageA_relative_url: URL pointing at an image, relative to base_url
|
| - imageB_relative_url: URL pointing at an image, relative to base_url
|
| + imageA_relative_url: string; URL pointing at an image, relative to
|
| + base_url; or None, if this image is missing
|
| + imageB_relative_url: string; URL pointing at an image, relative to
|
| + base_url; or None, if this image is missing
|
| expectations: optional dictionary containing expectations-specific
|
| metadata (ignore-failure, bug numbers, etc.)
|
| extra_columns: optional dictionary containing more metadata (test name,
|
| @@ -45,6 +48,10 @@ class ImagePair(object):
|
| self.extra_columns_dict = extra_columns
|
| if imageA_relative_url == imageB_relative_url:
|
| self.diff_record = None
|
| + elif not imageA_relative_url:
|
| + self.diff_record = None
|
| + elif not imageB_relative_url:
|
| + self.diff_record = None
|
| else:
|
| # TODO(epoger): Rather than blocking until image_diff_db can read in
|
| # the image pair and generate diffs, it would be better to do it
|
|
|