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/pbuilder.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/pbuilder.py')
-rw-r--r-- | mdbp/pbuilder.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mdbp/pbuilder.py b/mdbp/pbuilder.py index c2df394..a3eb228 100644 --- a/mdbp/pbuilder.py +++ b/mdbp/pbuilder.py @@ -79,14 +79,14 @@ runuser -u pbuilder -- lintian %s "${BUILDDIR:-/tmp/buildd}"/*.changes """ % (shlex.join(apt_get), shlex.join(build["lintian"].get("options", [])))) hook.chmod(0o755) cmd.extend(["--hookdir", hookdirn, str(dscpath)]) - cproc = subprocess.run(cmd, env=compute_env(build), - stdout=None if enablelog - else subprocess.DEVNULL, - stderr=subprocess.STDOUT if enablelog - else subprocess.DEVNULL) + ret = subprocess.call(cmd, env=compute_env(build), + stdout=None if enablelog + else subprocess.DEVNULL, + stderr=subprocess.STDOUT if enablelog + 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() |