summaryrefslogtreecommitdiff
path: root/src/buildstream/buildelement.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildstream/buildelement.py')
-rw-r--r--src/buildstream/buildelement.py16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/buildstream/buildelement.py b/src/buildstream/buildelement.py
index 55f0dc0c3..4fa678932 100644
--- a/src/buildstream/buildelement.py
+++ b/src/buildstream/buildelement.py
@@ -243,9 +243,7 @@ class BuildElement(Element):
if not commands or command_name == "configure-commands":
continue
- with sandbox.batch(
- SandboxFlags.ROOT_READ_ONLY, label="Running {}".format(command_name)
- ):
+ with sandbox.batch(SandboxFlags.ROOT_READ_ONLY, label="Running {}".format(command_name)):
for cmd in commands:
self.__run_command(sandbox, cmd)
@@ -253,9 +251,7 @@ class BuildElement(Element):
# to - if an element later attempts to stage to a location
# that is not empty, we abort the build - in this case this
# will almost certainly happen.
- staged_build = os.path.join(
- self.get_variable("install-root"), self.get_variable("build-root")
- )
+ staged_build = os.path.join(self.get_variable("install-root"), self.get_variable("build-root"))
if os.path.isdir(staged_build) and os.listdir(staged_build):
self.warn(
@@ -272,9 +268,7 @@ class BuildElement(Element):
def prepare(self, sandbox):
commands = self.__commands["configure-commands"]
if commands:
- with sandbox.batch(
- SandboxFlags.ROOT_READ_ONLY, label="Running configure-commands"
- ):
+ with sandbox.batch(SandboxFlags.ROOT_READ_ONLY, label="Running configure-commands"):
for cmd in commands:
self.__run_command(sandbox, cmd)
@@ -299,6 +293,4 @@ class BuildElement(Element):
# Note the -e switch to 'sh' means to exit with an error
# if any untested command fails.
#
- sandbox.run(
- ["sh", "-c", "-e", cmd + "\n"], SandboxFlags.ROOT_READ_ONLY, label=cmd
- )
+ sandbox.run(["sh", "-c", "-e", cmd + "\n"], SandboxFlags.ROOT_READ_ONLY, label=cmd)