summaryrefslogtreecommitdiff
path: root/mdbp/sbuild.py
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2021-05-27 19:20:58 +0200
committerHelmut Grohne <helmut@subdivi.de>2021-05-27 19:20:58 +0200
commit79f0ec86ea38bf04e86687e603f246ea92a693b3 (patch)
treefad8dda098ed1be5d678bd2f7d575ab76705b2c1 /mdbp/sbuild.py
parente0edc0277327629115aa31b415709cf87a723574 (diff)
downloadmdbp-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.py20
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()