Index: build/android/pylib/local/device/local_device_instrumentation_test_run.py |
diff --git a/build/android/pylib/local/device/local_device_instrumentation_test_run.py b/build/android/pylib/local/device/local_device_instrumentation_test_run.py |
index 0231304b3b2e06413deea7d614f9c9850ea801dd..6252d7670acf91450ad44b8993bf6d2b7a7e93fb 100644 |
--- a/build/android/pylib/local/device/local_device_instrumentation_test_run.py |
+++ b/build/android/pylib/local/device/local_device_instrumentation_test_run.py |
@@ -6,7 +6,6 @@ import logging |
import os |
import posixpath |
import re |
-import sys |
import tempfile |
import time |
@@ -29,9 +28,10 @@ from py_utils import contextlib_ext |
from py_utils import tempfile_ext |
import tombstones |
-sys.path.append(os.path.join(host_paths.DIR_SOURCE_ROOT, 'third_party')) |
-import jinja2 # pylint: disable=import-error |
-import markupsafe # pylint: disable=import-error,unused-import |
+with host_paths.SysPath( |
+ os.path.join(host_paths.DIR_SOURCE_ROOT, 'third_party'), 1): |
Nico
2017/05/19 16:03:43
Why is this better than just sys.path.insert(0, ..
|
+ import jinja2 # pylint: disable=import-error |
+ import markupsafe # pylint: disable=import-error,unused-import |
_JINJA_TEMPLATE_DIR = os.path.join( |