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

Unified Diff: telemetry/telemetry/internal/platform/profiler/perf_profiler.py

Issue 2709523005: [Telemetry] Switch RunShellCommand clients to check_return=True (Closed)
Patch Set: revert change in chown command Created 3 years, 10 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
Index: telemetry/telemetry/internal/platform/profiler/perf_profiler.py
diff --git a/telemetry/telemetry/internal/platform/profiler/perf_profiler.py b/telemetry/telemetry/internal/platform/profiler/perf_profiler.py
index 0d69fb69ff4c997ed48b191542eb15835dbdb02d..aac177ee97f623c5225103d72bb80709ac48ce9d 100644
--- a/telemetry/telemetry/internal/platform/profiler/perf_profiler.py
+++ b/telemetry/telemetry/internal/platform/profiler/perf_profiler.py
@@ -92,9 +92,9 @@ class _SingleProcessPerfProfiler(object):
os.path.basename(output_file))
self._device_output_file = output_file
browser_backend.device.RunShellCommand(
- 'mkdir -p ' + os.path.dirname(self._device_output_file))
- browser_backend.device.RunShellCommand(
- 'rm -f ' + self._device_output_file)
+ ['mkdir', '-p', os.path.dirname(self._device_output_file)],
+ check_return=True)
+ browser_backend.device.RemovePath(self._device_output_file, force=True)
else:
cmd_prefix = [perf_binary]
perf_args += ['--output', output_file] + _PERF_OPTIONS

Powered by Google App Engine
This is Rietveld 408576698