Commit 46113e0c authored by Pablo Galindo's avatar Pablo Galindo Committed by GitHub

bpo-38456: Handle the case when there is no 'true' command (GH-16739)

parent 27b33fb4
......@@ -59,6 +59,8 @@ ZERO_RETURN_CMD = (sys.executable, '-c', 'pass')
def setUpModule():
shell_true = shutil.which('true')
if shell_true is None:
return
if (os.access(shell_true, os.X_OK) and
subprocess.run([shell_true]).returncode == 0):
global ZERO_RETURN_CMD
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment