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..6d999c867b21238b26ddbcdded92b2cba5866fc6 100644 |
--- a/build/android/pylib/android_commands.py |
+++ b/build/android/pylib/android_commands.py |
@@ -465,10 +465,13 @@ 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' |
- logging.info('Waiting for device to settle...') |
- self._adb.SendCommand('wait-for-device') |
+ try: |
+ if not self.KillAll('adbd', signal=signal.SIGTERM, with_su=True): |
+ logging.error('Unable to obtain adbd pid') |
+ logging.info('Waiting for device to settle...') |
+ self._adb.SendCommand('wait-for-device') |
tonyg
2013/11/27 16:24:15
The idea of this wait-for-device is that it must b
bulach
2013/11/27 18:04:27
you're right. I was mistaken, KillAll just returns
|
+ except Except as e: |
tonyg
2013/11/27 16:24:15
s/Except/Exception/ -- no?
bulach
2013/11/27 18:04:27
facepalm :(
|
+ logging.error('Exception when trying to kill adbd on the device [%s]', e) |
def RestartAdbServer(self): |
"""Restart the adb server.""" |