diff options
author | James Ennis <james.ennis@codethink.co.uk> | 2019-03-07 16:46:48 +0000 |
---|---|---|
committer | James Ennis <james.ennis@codethink.co.uk> | 2019-03-07 16:46:48 +0000 |
commit | 2b556cdeaaa250bd25579fca7c7786d5a7ec7b7b (patch) | |
tree | 7da93e9e3cd71c1310df4ef8692da49b2dc5a2da | |
parent | 8ee336e948eb170fd9714bd060fc4f1e4628eeea (diff) | |
download | buildstream-jennis/add_yaml_roundtrip_module.tar.gz |
_yaml_roundtrip.py: Remove YAML cache logicjennis/add_yaml_roundtrip_module
-rw-r--r-- | buildstream/_yaml_roundtrip.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/buildstream/_yaml_roundtrip.py b/buildstream/_yaml_roundtrip.py index 482e23bb3..47a8e22dc 100644 --- a/buildstream/_yaml_roundtrip.py +++ b/buildstream/_yaml_roundtrip.py @@ -182,13 +182,12 @@ class CompositeTypeError(CompositeError): # shortname (str): The filename in shorthand for error reporting (or None) # copy_tree (bool): Whether to make a copy, preserving the original toplevels # for later serialization -# yaml_cache (YamlCache): A yaml cache to consult rather than parsing # # Returns (dict): A loaded copy of the YAML file with provenance information # # Raises: LoadError # -def load(filename, shortname=None, copy_tree=False, *, project=None, yaml_cache=None): +def load(filename, shortname=None, copy_tree=False, *, project=None): if not shortname: shortname = filename @@ -198,13 +197,9 @@ def load(filename, shortname=None, copy_tree=False, *, project=None, yaml_cache= data = None with open(filename) as f: contents = f.read() - if yaml_cache: - data, key = yaml_cache.get(project, filename, contents, copy_tree) if not data: data = load_data(contents, file, copy_tree=copy_tree) - if yaml_cache: - yaml_cache.put_from_key(project, filename, key, data) return data except FileNotFoundError as e: |