summaryrefslogtreecommitdiff
path: root/buildstream/_loader.py
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-10-01 19:06:21 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-10-01 19:17:13 +0900
commit2d664a9a47c55f5adb8f7d9694fc4198067411ea (patch)
treee05f1e6b5f06312f986a170b1f29d7502617c863 /buildstream/_loader.py
parent717ef5e35deda4637d0b74a62a3718b83e5471b1 (diff)
downloadbuildstream-2d664a9a47c55f5adb8f7d9694fc4198067411ea.tar.gz
_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().
Diffstat (limited to 'buildstream/_loader.py')
-rw-r--r--buildstream/_loader.py4
1 files changed, 2 insertions, 2 deletions
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="")