diff options
author | Benjamin Schubert <contact@benschubert.me> | 2019-10-10 18:31:25 +0100 |
---|---|---|
committer | Benjamin Schubert <contact@benschubert.me> | 2019-10-16 13:51:25 +0100 |
commit | 1b92d90b5b95241e9c44d02a63713ca2de8a98f4 (patch) | |
tree | 749ef3620212d3f0eea58e11af5209568a1b2911 /src/buildstream/buildelement.py | |
parent | c6a7f43535138f86acd9e3c800618363be5b8e93 (diff) | |
download | buildstream-1b92d90b5b95241e9c44d02a63713ca2de8a98f4.tar.gz |
element.py: change 'substitute_variables' to take a 'ScalarNode' and rename
Previously 'substitute_variable' would take a str, which would prevent
us from doing nice error reporting. Using a 'ScalarNode' allows us
to get our errors nicely.
- rename it to 'node_subst_vars'.
- add a nicer try-except around it in order to get nicer error reporting to users.
Diffstat (limited to 'src/buildstream/buildelement.py')
-rw-r--r-- | src/buildstream/buildelement.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buildstream/buildelement.py b/src/buildstream/buildelement.py index b33acfe12..7fe97c168 100644 --- a/src/buildstream/buildelement.py +++ b/src/buildstream/buildelement.py @@ -281,9 +281,9 @@ class BuildElement(Element): # Private Local Methods # ############################################################# def __get_commands(self, node, name): - raw_commands = node.get_str_list(name, []) + raw_commands = node.get_sequence(name, []) return [ - self.substitute_variables(command) + self.node_subst_vars(command) for command in raw_commands ] |