summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Schubert <bschubert15@bloomberg.net>2018-08-24 15:52:05 +0100
committerBenjamin Schubert <bschubert15@bloomberg.net>2018-08-24 15:52:49 +0100
commit0301f74e5c1b942b10abdbb0ec3c91cdde0c57d5 (patch)
tree5932321cb6827ee4c8a03ed6db747b9e74209609
parent4c40a027d3088ab0485145b04e3f0233e38155e6 (diff)
downloadbuildstream-0301f74e5c1b942b10abdbb0ec3c91cdde0c57d5.tar.gz
buildelement.py: remove double logging (again) as in #507
This was broken again by d14d8ee29b5fcaadcfd05934de71b46221243fcd, this commits re-applies the fix from 12fea82e12a27eccb34ef4efbaa7c6874787eb4c
-rw-r--r--buildstream/buildelement.py21
1 files changed, 10 insertions, 11 deletions
diff --git a/buildstream/buildelement.py b/buildstream/buildelement.py
index d729eaa81..180bb86ab 100644
--- a/buildstream/buildelement.py
+++ b/buildstream/buildelement.py
@@ -233,14 +233,13 @@ class BuildElement(Element):
return commands
def __run_command(self, sandbox, cmd, cmd_name):
- with self.timed_activity("Running {}".format(cmd_name)):
- self.status("Running {}".format(cmd_name), detail=cmd)
-
- # Note the -e switch to 'sh' means to exit with an error
- # if any untested command fails.
- #
- exitcode = sandbox.run(['sh', '-c', '-e', cmd + '\n'],
- SandboxFlags.ROOT_READ_ONLY)
- if exitcode != 0:
- raise ElementError("Command '{}' failed with exitcode {}".format(cmd, exitcode),
- collect=self.get_variable('install-root'))
+ self.status("Running {}".format(cmd_name), detail=cmd)
+
+ # Note the -e switch to 'sh' means to exit with an error
+ # if any untested command fails.
+ #
+ exitcode = sandbox.run(['sh', '-c', '-e', cmd + '\n'],
+ SandboxFlags.ROOT_READ_ONLY)
+ if exitcode != 0:
+ raise ElementError("Command '{}' failed with exitcode {}".format(cmd, exitcode),
+ collect=self.get_variable('install-root'))