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

Unified Diff: telemetry/telemetry/internal/platform/tracing_agent/battor_tracing_agent.py

Issue 2057913003: [BattOr] Do not catch exception when failing to start battor. (Closed) Base URL: git@github.com:catapult-project/catapult@master
Patch Set: fix unit tests Created 4 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 | telemetry/telemetry/internal/platform/tracing_agent/battor_tracing_agent_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/internal/platform/tracing_agent/battor_tracing_agent.py
diff --git a/telemetry/telemetry/internal/platform/tracing_agent/battor_tracing_agent.py b/telemetry/telemetry/internal/platform/tracing_agent/battor_tracing_agent.py
index 483940bf8b30b80c9982f80e66a428d51c60706d..7c859dbee363417c8b13323f0c62cdac6c0bb8ca 100644
--- a/telemetry/telemetry/internal/platform/tracing_agent/battor_tracing_agent.py
+++ b/telemetry/telemetry/internal/platform/tracing_agent/battor_tracing_agent.py
@@ -73,14 +73,15 @@ class BattOrTracingAgent(tracing_agent.TracingAgent):
except battor_error.BattorError:
if self._battery:
self._battery.SetCharging(True)
- logging.exception('Failure in starting tracing on BattOr.')
- return False
+ raise
def StopAgentTracing(self):
"""Stops tracing on the BattOr."""
- self._battor.StopTracing()
- if self._battery:
- self._battery.SetCharging(True)
+ try:
+ self._battor.StopTracing()
+ finally:
+ if self._battery:
+ self._battery.SetCharging(True)
def SupportsExplicitClockSync(self):
return self._battor.SupportsExplicitClockSync()
« no previous file with comments | « no previous file | telemetry/telemetry/internal/platform/tracing_agent/battor_tracing_agent_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698