From add19e0e569601fba9294950399d77f5ffb3824d Mon Sep 17 00:00:00 2001 From: Smit Hinsu Date: Thu, 27 Dec 2018 18:32:31 -0800 Subject: [PATCH] Automated rollback of commit ee0856d0d92717dee6bb71788c3e562adb5c998a. Revert #24569. PiperOrigin-RevId: 227083461 --- third_party/py/python_configure.bzl | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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)