| Index: tools/telemetry/telemetry/core/util.py
|
| diff --git a/tools/telemetry/telemetry/core/util.py b/tools/telemetry/telemetry/core/util.py
|
| index efeab5aa7f8eaf6af6e20741002397a34ea5411d..e5114693686f8534025a9fa45077c9940ddf52fb 100644
|
| --- a/tools/telemetry/telemetry/core/util.py
|
| +++ b/tools/telemetry/telemetry/core/util.py
|
| @@ -38,8 +38,10 @@ def GetChromiumSrcDir():
|
|
|
| def AddDirToPythonPath(*path_parts):
|
| path = os.path.abspath(os.path.join(*path_parts))
|
| - if os.path.isdir(path) and path not in sys.path:
|
| - sys.path.append(path)
|
| + if os.path.isdir(path):
|
| + if path in sys.path:
|
| + sys.path.remove(path)
|
| + sys.path.insert(0, path)
|
|
|
| _counter = [0]
|
| def _GetUniqueModuleName():
|
|
|