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

Unified Diff: gm/gm_json.py

Issue 474813002: rebaseline_server: include setA/setB descriptions in output JSON (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use posixpath.join() Created 6 years, 4 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 | gm/rebaseline_server/compare_configs.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/gm_json.py
diff --git a/gm/gm_json.py b/gm/gm_json.py
index 3f43b340a54f78b48af9d9297742b77665873ca3..62d5755f52b8a8682fb45072e23ffbca401d8c87 100644
--- a/gm/gm_json.py
+++ b/gm/gm_json.py
@@ -163,11 +163,14 @@ def SplitGmRelativeUrl(url):
def LoadFromString(file_contents):
"""Loads the JSON summary written out by the GM tool.
+
Returns a dictionary keyed by the values listed as JSONKEY_ constants
- above."""
+ above; if file_contents is empty, returns None."""
# TODO(epoger): we should add a version number to the JSON file to ensure
# that the writer and reader agree on the schema (raising an exception
# otherwise).
+ if not file_contents:
+ return None
json_dict = json.loads(file_contents)
return json_dict
« no previous file with comments | « no previous file | gm/rebaseline_server/compare_configs.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698