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

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

Issue 91563002: Android: makes "RestartAdbdOnDevice" more robust. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/android_commands.py
diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py
index 6f9b99cc2405f9eab6760fe5d71d4fa5c5a9196c..526b38d2bef1ce9806ddbc9f134e9e1d8cb56f14 100644
--- a/build/android/pylib/android_commands.py
+++ b/build/android/pylib/android_commands.py
@@ -465,8 +465,11 @@ class AndroidCommands(object):
def RestartAdbdOnDevice(self):
logging.info('Killing adbd on the device...')
- adb_pids = self.KillAll('adbd', signal=signal.SIGTERM, with_su=True)
- assert adb_pids, 'Unable to obtain adbd pid'
+ try:
+ adb_pids = self.KillAll('adbd', signal=signal.SIGTERM, with_su=True)
+ assert adb_pids, 'Unable to obtain adbd pid'
tonyg 2013/11/27 15:25:55 heh heh, catching your own assertion is kind of fu
bulach 2013/11/27 16:17:59 ha! :) good point.. made it a bit clear now.
+ except Except as e:
+ logging.error('Exception when trying to kill adbd on the device [%s]', e)
logging.info('Waiting for device to settle...')
self._adb.SendCommand('wait-for-device')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698