From 2d664a9a47c55f5adb8f7d9694fc4198067411ea Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Sun, 1 Oct 2017 19:06:21 +0900 Subject: _yaml.py: Fixing inconsistently named API _yaml.validate_node() All of the _yaml APIs which deal with a node (dictionary loaded from YAML) are named _yaml.node_foo(), _yaml.node_bar(), _yaml.node_baz() etc, except for this one glaring exception. Also added a missing internal API documenting comment for _yaml.node_validate() Also updated all callers to _yaml.validate_node() to now call _yaml.node_validate(). --- buildstream/_loader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'buildstream/_loader.py') diff --git a/buildstream/_loader.py b/buildstream/_loader.py index a442dee2c..2385cf4c5 100644 --- a/buildstream/_loader.py +++ b/buildstream/_loader.py @@ -212,7 +212,7 @@ class LoadElement(): self.basedir = basedir # Ensure the root node is valid - _yaml.validate_node(self.data, [ + _yaml.node_validate(self.data, [ 'kind', 'depends', 'sources', 'variables', 'environment', 'environment-nocache', 'config', 'public', 'description', @@ -378,7 +378,7 @@ def extract_depends_from_node(owner, data): dependency = Dependency(owner, dep, filename=dep, provenance=dep_provenance) elif isinstance(dep, Mapping): - _yaml.validate_node(dep, ['filename', 'type', 'variant']) + _yaml.node_validate(dep, ['filename', 'type', 'variant']) # Make variant optional, for this we set it to None after variant = _yaml.node_get(dep, str, Symbol.VARIANT, default_value="") -- cgit v1.2.1