diff options
Diffstat (limited to 'src/buildstream/plugin.py')
-rw-r--r-- | src/buildstream/plugin.py | 7 |
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) |