mirror of https://github.com/zulip/zulip.git
ruff: Fix S605 Starting a process with a shell.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
a1a341f0ae
commit
eb622bae0a
|
@ -275,11 +275,16 @@ def install_yum_deps(deps_to_install: List[str]) -> None:
|
||||||
# Requires: perl(IPC::Run)
|
# Requires: perl(IPC::Run)
|
||||||
yum_extra_flags: List[str] = []
|
yum_extra_flags: List[str] = []
|
||||||
if vendor == "rhel":
|
if vendor == "rhel":
|
||||||
exitcode, subs_status = subprocess.getstatusoutput("sudo subscription-manager status")
|
proc = subprocess.run(
|
||||||
if exitcode == 1:
|
["sudo", "subscription-manager", "status"],
|
||||||
|
stdout=subprocess.PIPE,
|
||||||
|
text=True,
|
||||||
|
check=False,
|
||||||
|
)
|
||||||
|
if proc.returncode == 1:
|
||||||
# TODO this might overkill since `subscription-manager` is already
|
# TODO this might overkill since `subscription-manager` is already
|
||||||
# called in setup-yum-repo
|
# called in setup-yum-repo
|
||||||
if "Status" in subs_status:
|
if "Status" in proc.stdout:
|
||||||
# The output is well-formed
|
# The output is well-formed
|
||||||
yum_extra_flags = ["--skip-broken"]
|
yum_extra_flags = ["--skip-broken"]
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue