Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

ruff: Fix S605 Starting a process with a shell.

Anders Kaseorgeb622bae0a9f
diff --git a/tools/lib/provision.py b/tools/lib/provision.py
index 154958b97fc..649a783db10 100755
--- a/tools/lib/provision.py
+++ b/tools/lib/provision.py
@@ -275,11 +275,16 @@ def install_yum_deps(deps_to_install: List[str]) -> None:
# Requires: perl(IPC::Run)
yum_extra_flags: List[str] = []
if vendor == "rhel":
- exitcode, subs_status = subprocess.getstatusoutput("sudo subscription-manager status")
- if exitcode == 1:
+ proc = subprocess.run(
+ ["sudo", "subscription-manager", "status"],
+ stdout=subprocess.PIPE,
+ text=True,
+ check=False,
+ )
+ if proc.returncode == 1:
# TODO this might overkill since `subscription-manager` is already
# called in setup-yum-repo
- if "Status" in subs_status:
+ if "Status" in proc.stdout:
# The output is well-formed
yum_extra_flags = ["--skip-broken"]
else: