Skip to content

Commit 578c6c2

Browse files
authored
PYTHON-5423 Always use subprocess.run instead of subprocess.check_call or subprocess.call (#2412)
1 parent ed26975 commit 578c6c2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

hatch_build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def initialize(self, version, build_data):
1919
here = Path(__file__).parent.resolve()
2020
sys.path.insert(0, str(here))
2121

22-
subprocess.check_call([sys.executable, "_setup.py", "build_ext", "-i"])
22+
subprocess.run([sys.executable, "_setup.py", "build_ext", "-i"], check=True)
2323

2424
# Ensure wheel is marked as binary and contains the binary files.
2525
build_data["infer_tag"] = True

test/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ def fips_enabled(self):
369369
if self._fips_enabled is not None:
370370
return self._fips_enabled
371371
try:
372-
subprocess.check_call(["fips-mode-setup", "--is-enabled"])
372+
subprocess.run(["fips-mode-setup", "--is-enabled"], check=True)
373373
self._fips_enabled = True
374374
except (subprocess.SubprocessError, FileNotFoundError):
375375
self._fips_enabled = False

test/asynchronous/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ def fips_enabled(self):
369369
if self._fips_enabled is not None:
370370
return self._fips_enabled
371371
try:
372-
subprocess.check_call(["fips-mode-setup", "--is-enabled"])
372+
subprocess.run(["fips-mode-setup", "--is-enabled"], check=True)
373373
self._fips_enabled = True
374374
except (subprocess.SubprocessError, FileNotFoundError):
375375
self._fips_enabled = False

0 commit comments

Comments
 (0)