diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-10-19 23:26:01 +0900 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2017-11-02 11:46:39 +0000 |
commit | b5e9c8da9cad6f313f1590f64e31202efabd3a69 (patch) | |
tree | 617014fb42b12b8dc74c5d37f6192d81992f91f0 | |
parent | 506196de5c9cbf2aca172b1e224d24794e533fbb (diff) | |
download | buildstream-b5e9c8da9cad6f313f1590f64e31202efabd3a69.tar.gz |
plugins/elements/script.py: Issue #121 - Remove traces of pre-/post- commands
-rw-r--r-- | buildstream/plugins/elements/script.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/buildstream/plugins/elements/script.py b/buildstream/plugins/elements/script.py index 2b3ca969d..32d03be7e 100644 --- a/buildstream/plugins/elements/script.py +++ b/buildstream/plugins/elements/script.py @@ -46,20 +46,15 @@ class ScriptElement(buildstream.ScriptElement): elm = self.node_subst_member(n, 'element', default_value='') or None self.layout_add(elm, dst) - cmds = [] - prefixes = ["pre-", "", "post-"] - self.node_validate(node, [ - 'pre-commands', 'commands', 'post-commands', - 'root-read-only', 'layout' + 'commands', 'root-read-only', 'layout' ]) if "commands" not in node: raise ElementError("{}: Unexpectedly missing command group 'commands'" .format(self)) - for prefix in prefixes: - if prefix + "commands" in node: - cmds += self.node_subst_list(node, prefix + "commands") + + cmds = self.node_subst_list(node, "commands") self.add_commands("commands", cmds) self.set_work_dir() |