diff options
author | Helmut Grohne <helmut@subdivi.de> | 2021-05-27 19:20:58 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2021-05-27 19:20:58 +0200 |
commit | 79f0ec86ea38bf04e86687e603f246ea92a693b3 (patch) | |
tree | fad8dda098ed1be5d678bd2f7d575ab76705b2c1 /mdbp/sbuild.py | |
parent | e0edc0277327629115aa31b415709cf87a723574 (diff) | |
download | mdbp-79f0ec86ea38bf04e86687e603f246ea92a693b3.tar.gz |
prefer subprocess.call over subprocess.run
Avoid pylint complaining and we don't need the CompletedProcess object.
Diffstat (limited to 'mdbp/sbuild.py')
-rw-r--r-- | mdbp/sbuild.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/mdbp/sbuild.py b/mdbp/sbuild.py index 5309031..ba42932 100644 --- a/mdbp/sbuild.py +++ b/mdbp/sbuild.py @@ -90,18 +90,18 @@ def main() -> None: except KeyError: thing = str(stack.enter_context(get_dsc(build)).absolute()) - cproc = subprocess.run(["sbuild", thing], - env=dict(SBUILD_CONFIG=sbuildconf.name, - PATH="/usr/bin:/bin"), - cwd=build["output"]["directory"], - stdout=None if build["output"].get("log", True) - else subprocess.DEVNULL, - stderr=subprocess.STDOUT - if build["output"].get("log", True) - else subprocess.DEVNULL) + ret = subprocess.call(["sbuild", thing], + env=dict(SBUILD_CONFIG=sbuildconf.name, + PATH="/usr/bin:/bin"), + cwd=build["output"]["directory"], + stdout=None if build["output"].get("log", True) + else subprocess.DEVNULL, + stderr=subprocess.STDOUT + if build["output"].get("log", True) + else subprocess.DEVNULL) clean_dir(pathlib.Path(build["output"]["directory"]), build["output"].get("artifacts", ["*"])) - sys.exit(cproc.returncode) + sys.exit(ret) if __name__ == "__main__": main() |