Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Unified Diff: tools/jsondiff.py

Issue 23769005: svndiff.py: properly handle empty expectations dictionary (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/jsondiff.py
===================================================================
--- tools/jsondiff.py (revision 11077)
+++ tools/jsondiff.py (working copy)
@@ -80,6 +80,12 @@
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[
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698