summaryrefslogtreecommitdiff
path: root/src/buildstream/buildelement.py
diff options
context:
space:
mode:
authorChandan Singh <csingh43@bloomberg.net>2019-11-05 13:40:03 +0000
committerChandan Singh <csingh43@bloomberg.net>2019-11-05 13:40:03 +0000
commitab707e87f53249d7f2aac17683254b54196f90ce (patch)
treed1d2898c6561a8ca362419dce92a6f808d45b4e6 /src/buildstream/buildelement.py
parente06c2295b063245dbdb2397e5bd8c4d0a79ba10d (diff)
downloadbuildstream-ab707e87f53249d7f2aac17683254b54196f90ce.tar.gz
Use 119 line lengthchandan/black
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)