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

Unified Diff: tools/isolate/isolate.py

Issue 10543058: Slowly transition to the "with api.get_tracer() as tracer:". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No need for temp var Created 8 years, 6 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 | « no previous file | tools/isolate/trace_inputs.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/isolate/isolate.py
diff --git a/tools/isolate/isolate.py b/tools/isolate/isolate.py
index c024d520d445339ee569827f6fe32122b25eccbe..0cb7b0c2093b6968fab1686fec8656a9f8287fb8 100755
--- a/tools/isolate/isolate.py
+++ b/tools/isolate/isolate.py
@@ -585,11 +585,12 @@ def MODEtrace(_outdir, state):
try:
result = 0
if not os.path.isfile(logfile):
- result, _ = api.get_tracer().trace(
- state.result.command,
- os.path.join(state.root_dir, state.result.relative_cwd),
- logfile,
- True)
+ with api.get_tracer(logfile) as tracer:
+ result, _ = tracer.trace(
+ state.result.command,
+ os.path.join(state.root_dir, state.result.relative_cwd),
+ 'default',
+ True)
results = trace_inputs.load_trace(logfile, state.root_dir, api)
simplified = trace_inputs.extract_directories(state.root_dir, results.files)
« no previous file with comments | « no previous file | tools/isolate/trace_inputs.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698