summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-10-19 23:26:01 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-11-06 00:14:47 +0900
commit656ddd347ed338926a320a04eb5c71b562faf710 (patch)
treedab4b8d20c51b049e375f9219471cfdc1bf26c2a
parentb9b02fcae1bd054faa3a674bd4c9362fe25a4fa8 (diff)
downloadbuildstream-656ddd347ed338926a320a04eb5c71b562faf710.tar.gz
plugins/elements/script.py: Issue #121 - Remove traces of pre-/post- commands
-rw-r--r--buildstream/plugins/elements/script.py11
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()