summaryrefslogtreecommitdiff
path: root/chromium/tools/json_schema_compiler/json_schema.py
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2013-12-11 21:33:03 +0100
committerAndras Becsi <andras.becsi@digia.com>2013-12-13 12:34:07 +0100
commitf2a33ff9cbc6d19943f1c7fbddd1f23d23975577 (patch)
tree0586a32aa390ade8557dfd6b4897f43a07449578 /chromium/tools/json_schema_compiler/json_schema.py
parent5362912cdb5eea702b68ebe23702468d17c3017a (diff)
downloadqtwebengine-chromium-f2a33ff9cbc6d19943f1c7fbddd1f23d23975577.tar.gz
Update Chromium to branch 1650 (31.0.1650.63)
Change-Id: I57d8c832eaec1eb2364e0a8e7352a6dd354db99f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'chromium/tools/json_schema_compiler/json_schema.py')
-rw-r--r--chromium/tools/json_schema_compiler/json_schema.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/chromium/tools/json_schema_compiler/json_schema.py b/chromium/tools/json_schema_compiler/json_schema.py
index 0fa1ba57e96..ae126c2de91 100644
--- a/chromium/tools/json_schema_compiler/json_schema.py
+++ b/chromium/tools/json_schema_compiler/json_schema.py
@@ -3,11 +3,8 @@
# found in the LICENSE file.
import copy
-import os
-import sys
import json_parse
-import schema_util
def DeleteNodes(item, delete_key):
"""Deletes the given nodes in item, recursively, that have |delete_key| as
@@ -31,15 +28,18 @@ def DeleteNodes(item, delete_key):
return item
+
def Load(filename):
with open(filename, 'r') as handle:
schemas = json_parse.Parse(handle.read())
return schemas
+
# A dictionary mapping |filename| to the object resulting from loading the JSON
# at |filename|.
_cache = {}
+
def CachedLoad(filename):
"""Equivalent to Load(filename), but caches results for subsequent calls"""
if filename not in _cache: