Index: build/android/pylib/screenshot.py |
diff --git a/build/android/pylib/screenshot.py b/build/android/pylib/screenshot.py |
index e21d7560b6e5854193362701e91d7935073fca60..ea939b704ce6fd51fc0f70aac82a86af46cb66f2 100644 |
--- a/build/android/pylib/screenshot.py |
+++ b/build/android/pylib/screenshot.py |
@@ -2,11 +2,13 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
+import logging |
import os |
import signal |
import tempfile |
from pylib import cmd_helper |
+from pylib.device import device_errors |
# TODO(jbudorick) Remove once telemetry gets switched over. |
import pylib.android_commands |
@@ -71,7 +73,10 @@ class VideoRecorder(object): |
self._is_started = False |
if not self._recorder: |
return |
- self._device.KillAll('screenrecord', signum=signal.SIGINT) |
+ try: |
+ self._device.KillAll('screenrecord', signum=signal.SIGINT) |
+ except device_errors.CommandFailedError: |
+ logging.warning('Nothing to kill: screenrecord was not running') |
self._recorder.wait() |
def Pull(self, host_file=None): |