PYTHON-5423 Always use subprocess.run instead of subprocess.check_call or subprocess.call (#2412)
This commit is contained in:
parent
ed26975926
commit
578c6c2ad2
@ -19,7 +19,7 @@ class CustomHook(BuildHookInterface):
|
|||||||
here = Path(__file__).parent.resolve()
|
here = Path(__file__).parent.resolve()
|
||||||
sys.path.insert(0, str(here))
|
sys.path.insert(0, str(here))
|
||||||
|
|
||||||
subprocess.check_call([sys.executable, "_setup.py", "build_ext", "-i"])
|
subprocess.run([sys.executable, "_setup.py", "build_ext", "-i"], check=True)
|
||||||
|
|
||||||
# Ensure wheel is marked as binary and contains the binary files.
|
# Ensure wheel is marked as binary and contains the binary files.
|
||||||
build_data["infer_tag"] = True
|
build_data["infer_tag"] = True
|
||||||
|
|||||||
@ -369,7 +369,7 @@ class ClientContext:
|
|||||||
if self._fips_enabled is not None:
|
if self._fips_enabled is not None:
|
||||||
return self._fips_enabled
|
return self._fips_enabled
|
||||||
try:
|
try:
|
||||||
subprocess.check_call(["fips-mode-setup", "--is-enabled"])
|
subprocess.run(["fips-mode-setup", "--is-enabled"], check=True)
|
||||||
self._fips_enabled = True
|
self._fips_enabled = True
|
||||||
except (subprocess.SubprocessError, FileNotFoundError):
|
except (subprocess.SubprocessError, FileNotFoundError):
|
||||||
self._fips_enabled = False
|
self._fips_enabled = False
|
||||||
|
|||||||
@ -369,7 +369,7 @@ class AsyncClientContext:
|
|||||||
if self._fips_enabled is not None:
|
if self._fips_enabled is not None:
|
||||||
return self._fips_enabled
|
return self._fips_enabled
|
||||||
try:
|
try:
|
||||||
subprocess.check_call(["fips-mode-setup", "--is-enabled"])
|
subprocess.run(["fips-mode-setup", "--is-enabled"], check=True)
|
||||||
self._fips_enabled = True
|
self._fips_enabled = True
|
||||||
except (subprocess.SubprocessError, FileNotFoundError):
|
except (subprocess.SubprocessError, FileNotFoundError):
|
||||||
self._fips_enabled = False
|
self._fips_enabled = False
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user