diff options
author | Qinusty <jrsmith9822@gmail.com> | 2018-08-24 15:33:48 +0000 |
---|---|---|
committer | Qinusty <jrsmith9822@gmail.com> | 2018-08-24 15:33:48 +0000 |
commit | f991644cdb1f31763d30516d7b9b96661e6dad6d (patch) | |
tree | 5932321cb6827ee4c8a03ed6db747b9e74209609 | |
parent | 4c40a027d3088ab0485145b04e3f0233e38155e6 (diff) | |
parent | 0301f74e5c1b942b10abdbb0ec3c91cdde0c57d5 (diff) | |
download | buildstream-f991644cdb1f31763d30516d7b9b96661e6dad6d.tar.gz |
Merge branch 'bschubert15/fix-double-log' into 'master'
buildelement.py: remove double logging (again) as in #507
See merge request BuildStream/buildstream!730
-rw-r--r-- | buildstream/buildelement.py | 21 |
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')) |