buildroot: drop kwargs from buildroot.run()

Drop the `kwargs` forwarding from buildroot.run() to subprocess.run().
We do not use it other than for `stdin=subprocess.DEVNULL`. Set that
option directly instead.

Doing the kwargs forwarding mixes the argument namespaces and is very
hard to read. It is not clear from the call-site which argument goes to
buildroot.run() and which to subprocess.run().

Lastly, it requires us to manually fetch `check` just to make pylint
happy. Lets just drop this dance and make the API explicit.
This commit is contained in:
David Rheinsberg 2020-05-11 15:56:36 +02:00
parent 016d520dda
commit d4f40362ec
2 changed files with 2 additions and 7 deletions

View file

@ -101,7 +101,6 @@ class Stage:
[f"/run/osbuild/lib/stages/{self.name}"],
binds=[f"{tree}:/run/osbuild/tree"],
readonly_binds=ro_binds,
stdin=subprocess.DEVNULL,
)
return BuildResult(self, r.returncode, api.output)
@ -154,7 +153,6 @@ class Assembler:
[f"/run/osbuild/lib/assemblers/{self.name}"],
binds=binds,
readonly_binds=ro_binds,
stdin=subprocess.DEVNULL,
)
return BuildResult(self, r.returncode, api.output)