Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1097)

Unified Diff: build/android/pylib/utils/logging_utils.py

Issue 1571803002: [Android] Prepare build/android/ for catapult+devil. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@create-device-library-links
Patch Set: rebase Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/utils/isolator.py ('k') | build/android/resource_sizes.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/utils/logging_utils.py
diff --git a/build/android/pylib/utils/logging_utils.py b/build/android/pylib/utils/logging_utils.py
index 326a8b0a20e32d90db509aa137b7eeba3e534135..2c2eabf5b919974b343b423053c6c1afa9a249a0 100644
--- a/build/android/pylib/utils/logging_utils.py
+++ b/build/android/pylib/utils/logging_utils.py
@@ -5,12 +5,14 @@
import contextlib
import logging
import os
-import sys
-from pylib import constants
-sys.path.insert(0, os.path.join(constants.DIR_SOURCE_ROOT,
- 'third_party', 'colorama', 'src'))
-import colorama
+from pylib.constants import host_paths
+
+_COLORAMA_PATH = os.path.join(
+ host_paths.DIR_SOURCE_ROOT, 'third_party', 'colorama', 'src')
+
+with host_paths.SysPath(_COLORAMA_PATH):
+ import colorama
class ColorStreamHandler(logging.StreamHandler):
"""Handler that can be used to colorize logging output.
« no previous file with comments | « build/android/pylib/utils/isolator.py ('k') | build/android/resource_sizes.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698