diff options
author | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2017-11-09 11:42:24 +0000 |
---|---|---|
committer | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2017-11-14 13:03:51 +0000 |
commit | 8ad1a968e9798955e57e11ff7930f4459bbc560c (patch) | |
tree | 525d3004c91d0e5569f89ecd62c1790f799a5844 | |
parent | add506fc22f2839bf1e41662f05f6f599f904714 (diff) | |
download | buildstream-8ad1a968e9798955e57e11ff7930f4459bbc560c.tar.gz |
element.py: Change node_subst_member's 'default_value' field to 'default'
-rw-r--r-- | buildstream/element.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/buildstream/element.py b/buildstream/element.py index 835bd0df8..c95de41cf 100644 --- a/buildstream/element.py +++ b/buildstream/element.py @@ -251,20 +251,20 @@ class Element(Plugin): return None - def node_subst_member(self, node, member_name, default_value=None): + def node_subst_member(self, node, member_name, default=None): """Fetch the value of a string node member, substituting any variables in the loaded value with the element contextual variables. Args: node (dict): A dictionary loaded from YAML member_name (str): The name of the member to fetch - default_value (str): A value to return when *member_name* is not specified in *node* + default (str): A value to return when *member_name* is not specified in *node* Returns: - The value of *member_name* in *node*, otherwise *default_value* + The value of *member_name* in *node*, otherwise *default* Raises: - :class:`.LoadError`: When *member_name* is not found and no *default_value* was provided + :class:`.LoadError`: When *member_name* is not found and no *default* was provided This is essentially the same as :func:`~buildstream.plugin.Plugin.node_get_member` except that it assumes the expected type is a string and will also perform variable @@ -278,7 +278,7 @@ class Element(Plugin): # variables in the returned string name = self.node_subst_member(node, 'name') """ - value = self.node_get_member(node, str, member_name, default_value) + value = self.node_get_member(node, str, member_name, default) return self.__variables.subst(value) def node_subst_list(self, node, member_name): |