Skip to content

Commit 46113e0

Browse files
authored
bpo-38456: Handle the case when there is no 'true' command (GH-16739)
1 parent 27b33fb commit 46113e0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/test/test_subprocess.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@
5959

6060
def setUpModule():
6161
shell_true = shutil.which('true')
62+
if shell_true is None:
63+
return
6264
if (os.access(shell_true, os.X_OK) and
6365
subprocess.run([shell_true]).returncode == 0):
6466
global ZERO_RETURN_CMD

0 commit comments

Comments
 (0)