From 041dcdfbad87e7ab1a836ccf04214591531ce1b7 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Thu, 17 Aug 2023 15:50:19 -0700 Subject: [PATCH] tools: Use subprocess.check_call where appropriate. Signed-off-by: Anders Kaseorg --- tools/check-capitalization | 4 +++- tools/check-frontend-i18n | 4 +++- .../prepare_digital_ocean_one_click_app_release.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/check-capitalization b/tools/check-capitalization index 35b19e3f3e..4fe8cd8bb1 100755 --- a/tools/check-capitalization +++ b/tools/check-capitalization @@ -32,7 +32,9 @@ if __name__ == "__main__": args = parser.parse_args() if not args.no_generate: - subprocess.call(["./manage.py", "makemessages", "--locale", "en"], stderr=subprocess.STDOUT) + subprocess.check_call( + ["./manage.py", "makemessages", "--locale", "en"], stderr=subprocess.STDOUT + ) with open("locale/en/translations.json") as f: data = json.load(f) diff --git a/tools/check-frontend-i18n b/tools/check-frontend-i18n index 2f33b7821f..10c98b445e 100755 --- a/tools/check-frontend-i18n +++ b/tools/check-frontend-i18n @@ -28,7 +28,9 @@ if __name__ == "__main__": args = parser.parse_args() if not args.no_generate: - subprocess.call(["./manage.py", "makemessages", "--locale", "en"], stderr=subprocess.STDOUT) + subprocess.check_call( + ["./manage.py", "makemessages", "--locale", "en"], stderr=subprocess.STDOUT + ) with open("locale/en/translations.json") as f: data = json.load(f) diff --git a/tools/oneclickapps/prepare_digital_ocean_one_click_app_release.py b/tools/oneclickapps/prepare_digital_ocean_one_click_app_release.py index c600a55192..da56e4d98f 100644 --- a/tools/oneclickapps/prepare_digital_ocean_one_click_app_release.py +++ b/tools/oneclickapps/prepare_digital_ocean_one_click_app_release.py @@ -18,7 +18,7 @@ TEST_DROPLET_SUBDOMAIN = "do" def generate_ssh_keys() -> None: - subprocess.call( + subprocess.check_call( ["ssh-keygen", "-f", str(Path.home()) + "/.ssh/id_ed25519", "-P", "", "-t", "ed25519"] )