diff --git a/third_party/py/python_configure.bzl b/third_party/py/python_configure.bzl index 57d216cfe17..53264630a16 100644 --- a/third_party/py/python_configure.bzl +++ b/third_party/py/python_configure.bzl @@ -207,12 +207,9 @@ def _get_python_lib(repository_ctx, python_bin): def _check_python_lib(repository_ctx, python_lib): """Checks the python lib path.""" - return_codes = [] - for entry in python_lib.split(":"): - cmd = 'test -d "%s" -a -x "%s"' % (entry, entry) - result = repository_ctx.execute([_get_bash_bin(repository_ctx), "-c", cmd]) - return_codes.append(result.return_code) - if all(return_codes): + cmd = 'test -d "%s" -a -x "%s"' % (python_lib, python_lib) + result = repository_ctx.execute([_get_bash_bin(repository_ctx), "-c", cmd]) + if result.return_code == 1: _fail("Invalid python library path: %s" % python_lib)