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

Unified Diff: build/android/pylib/__init__.py

Issue 2593903002: [android] Use contextlib_ext.Optional for conditional context managers. (Closed)
Patch Set: Created 4 years 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/PRESUBMIT.py ('k') | build/android/pylib/local/device/local_device_perf_test_run.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/__init__.py
diff --git a/build/android/pylib/__init__.py b/build/android/pylib/__init__.py
index 5dc2d761da51bbd0959d8aa8d26775b0907dbb09..997a6f43145d215cc0b3020198335b55b47d9bb5 100644
--- a/build/android/pylib/__init__.py
+++ b/build/android/pylib/__init__.py
@@ -5,16 +5,17 @@
import os
import sys
-_DEVIL_PATH = os.path.abspath(os.path.join(
- os.path.dirname(__file__), '..', '..', '..', 'third_party', 'catapult',
- 'devil'))
+_CATAPULT_PATH = os.path.abspath(os.path.join(
rnephew (Reviews Here) 2016/12/21 16:00:56 I'm guessing this will hit some merge conflicts wi
+ os.path.dirname(__file__), '..', '..', '..', 'third_party', 'catapult'))
+_DEVIL_PATH = os.path.join(_CATAPULT_PATH, 'devil')
+_PY_TRACE_EVENT_PATH = os.path.join(_CATAPULT_PATH, 'common', 'py_trace_event')
+_PY_UTILS_PATH = os.path.join(_CATAPULT_PATH, 'common', 'py_utils')
-_PYTRACE_PATH = os.path.abspath(os.path.join(
- os.path.dirname(__file__), '..', '..', '..', 'third_party', 'catapult',
- 'common', 'py_trace_event'))
+if _PY_UTILS_PATH not in sys.path:
+ sys.path.append(_PY_UTILS_PATH)
if _DEVIL_PATH not in sys.path:
sys.path.append(_DEVIL_PATH)
-if _PYTRACE_PATH not in sys.path:
- sys.path.append(_PYTRACE_PATH)
+if _PY_TRACE_EVENT_PATH not in sys.path:
+ sys.path.append(_PY_TRACE_EVENT_PATH)
« no previous file with comments | « build/android/PRESUBMIT.py ('k') | build/android/pylib/local/device/local_device_perf_test_run.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698