ruff: Fix PLW1510 `subprocess.run` without explicit `check` argument.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2023-08-17 15:50:03 -07:00 committed by Anders Kaseorg
parent 1df3db286b
commit c43629a222
5 changed files with 7 additions and 2 deletions

View File

@ -41,6 +41,7 @@ skip_backups = subprocess.run(
["crudini", "--get", "/etc/zulip/zulip.conf", "postgresql", "skip_backups"],
capture_output=True,
text=True,
check=False,
)
if skip_backups.returncode == 0 and skip_backups.stdout.strip().lower() in [
1,

View File

@ -399,7 +399,9 @@ has_puppet_changes = True
if not args.skip_puppet and IS_SERVER_UP:
logging.info("Pre-checking for puppet changes...")
try_puppet = subprocess.run(
["./scripts/zulip-puppet-apply", "--noop", "--force"], stdout=subprocess.DEVNULL
["./scripts/zulip-puppet-apply", "--noop", "--force"],
stdout=subprocess.DEVNULL,
check=False,
)
if try_puppet.returncode == 0:
if minimal_change:

View File

@ -185,6 +185,7 @@ if has_application_server():
uwsgi_status = subprocess.run(
["supervisorctl", "status", "zulip-django"],
stdout=subprocess.DEVNULL,
check=False,
)
if uwsgi_status.returncode == 0:
logging.info("Starting rolling restart of django server")

View File

@ -180,7 +180,7 @@ Proposed {BOLDRED}diff{ENDC} for {CYAN}{fn}{ENDC}:
""",
flush=True,
)
subprocess.run(["diff", fn, "-"], input=phtml, text=True)
subprocess.run(["diff", fn, "-"], input=phtml, text=True, check=False)
print(
f"""
---

View File

@ -1493,6 +1493,7 @@ class TestScriptMTA(ZulipTestCase):
input=mail,
stdout=subprocess.PIPE,
text=True,
check=False,
)
self.assertEqual(
p.stdout,