From bbb6b416f016bfa68c3cb78e5c1a323e8a25f8ba Mon Sep 17 00:00:00 2001 From: Michael Goin Date: Wed, 30 Dec 2020 17:22:55 -0500 Subject: [PATCH] Fix ImportError in build.py (#6231) There is a possible ImportError where build.py can import the wrong 'util' package if there are others present in `sys.path` already --- tools/ci_build/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py index 1bfb6bdc35..aa1845665a 100755 --- a/tools/ci_build/build.py +++ b/tools/ci_build/build.py @@ -18,7 +18,7 @@ from distutils.version import LooseVersion SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) REPO_DIR = os.path.normpath(os.path.join(SCRIPT_DIR, "..", "..")) -sys.path.append(os.path.join(REPO_DIR, "tools", "python")) +sys.path.insert(0, os.path.join(REPO_DIR, "tools", "python")) from util import run # noqa: E402