Commit 075c639a authored by maruel@chromium.org's avatar maruel@chromium.org

Enforce inserting the depot_tools path as the first path in sys.path.

Otherwise if there is a file named breakpad.py for instance in the current
directory, it will be loaded instead of the one in depot_tools.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/6312034

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@73165 0039d316-1c4b-4281-b951-d872f2087c98
parent e92854e4
...@@ -28,7 +28,7 @@ if not depot_tools_path: ...@@ -28,7 +28,7 @@ if not depot_tools_path:
# If we found depot_tools, add it to the script's import path. # If we found depot_tools, add it to the script's import path.
# Use realpath to normalize the actual path # Use realpath to normalize the actual path
if depot_tools_path: if depot_tools_path:
sys.path.append(os.path.realpath(depot_tools_path)) sys.path.insert(0, os.path.realpath(depot_tools_path))
else: else:
print "ERROR: Could not find depot_tools in your PATH." print "ERROR: Could not find depot_tools in your PATH."
print "ERROR: Please add it to your PATH and try again." print "ERROR: Please add it to your PATH and try again."
......
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