summaryrefslogtreecommitdiff
path: root/src/buildstream/plugin.py
diff options
context:
space:
mode:
authorBenjamin Schubert <ben.c.schubert@gmail.com>2019-07-05 17:00:13 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-07-15 14:14:03 +0000
commit2b1c63b50b11293377e87df802f35489e5f86c12 (patch)
tree70cc963390b24236238a47f64cc42280781b4e72 /src/buildstream/plugin.py
parentd256a13599e018dd1195ee98de5f0fbd5ed5c785 (diff)
downloadbuildstream-2b1c63b50b11293377e87df802f35489e5f86c12.tar.gz
_project: remove 'key' argument from 'get_path_from_node'
Now that we have scalar nodes, we can directly give the scalar to the method. - Adapt the plugin method to also not access via the key
Diffstat (limited to 'src/buildstream/plugin.py')
-rw-r--r--src/buildstream/plugin.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/buildstream/plugin.py b/src/buildstream/plugin.py
index cee24ea1f..2e5cc9678 100644
--- a/src/buildstream/plugin.py
+++ b/src/buildstream/plugin.py
@@ -363,7 +363,7 @@ class Plugin():
provenance = _yaml.node_get_provenance(node, key=member_name)
return str(provenance)
- def node_get_project_path(self, node, key, *,
+ def node_get_project_path(self, node, *,
check_is_file=False, check_is_dir=False):
"""Fetches a project path from a dictionary node and validates it
@@ -377,8 +377,7 @@ class Plugin():
``True``.
Args:
- node (dict): A dictionary loaded from YAML
- key (str): The key whose value contains a path to validate
+ node (ScalarNode): A Node loaded from YAML containing the path to validate
check_is_file (bool): If ``True`` an error will also be raised
if path does not point to a regular file.
Defaults to ``False``
@@ -403,7 +402,7 @@ class Plugin():
"""
- return self.__project.get_path_from_node(node, key,
+ return self.__project.get_path_from_node(node,
check_is_file=check_is_file,
check_is_dir=check_is_dir)