diff options
author | epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-09-04 16:27:16 +0000 |
---|---|---|
committer | epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-09-04 16:27:16 +0000 |
commit | d73531a722dc852a599af9899fdc7870248eb6c1 (patch) | |
tree | 6426c1de2a46169f64b7bbb76287d4777b40189a /tools/jsondiff.py | |
parent | 48282edff90a5dd4c350d58a0ce5e9d2f3ecb417 (diff) |
svndiff.py: properly handle empty expectations dictionary
BUG=skia:1588
R=jvanverth@google.com
Review URL: https://codereview.chromium.org/23769005
git-svn-id: http://skia.googlecode.com/svn/trunk@11078 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools/jsondiff.py')
-rwxr-xr-x | tools/jsondiff.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/jsondiff.py b/tools/jsondiff.py index 76958c6428..050a177b00 100755 --- a/tools/jsondiff.py +++ b/tools/jsondiff.py @@ -80,6 +80,12 @@ class GMDiffer(object): result_dict = {} json_dict = gm_json.LoadFromString(contents) all_expectations = json_dict[gm_json.JSONKEY_EXPECTEDRESULTS] + + # Prevent https://code.google.com/p/skia/issues/detail?id=1588 + # ('svndiff.py: 'NoneType' object has no attribute 'keys'') + if not all_expectations: + return result_dict + for test_name in all_expectations.keys(): test_expectations = all_expectations[test_name] allowed_digests = test_expectations[ |