Index: build/android/pylib/utils/emulator.py |
diff --git a/build/android/pylib/utils/emulator.py b/build/android/pylib/utils/emulator.py |
index 635462f208bed21d53165329c1fd02ec4aa54ef2..cc07e6139d7f51bcd0f63cad9dccc09cdc2c57db 100644 |
--- a/build/android/pylib/utils/emulator.py |
+++ b/build/android/pylib/utils/emulator.py |
@@ -86,17 +86,19 @@ def _KillAllEmulators(): |
"""Kill all running emulators that look like ones we started. |
There are odd 'sticky' cases where there can be no emulator process |
- running but a device slot is taken. A little bot trouble and and |
- we're out of room forever. |
+ running but a device slot is taken. A little bot trouble and we're out of |
+ room forever. |
""" |
- emulators = [d for d in device_utils.HealthyDevices() if d.adb.is_emulator] |
+ emulators = [d for d in device_utils.DeviceUtils.HealthyDevices() |
+ if d.adb.is_emulator] |
if not emulators: |
return |
for e in emulators: |
e.adb.Emu(['kill']) |
logging.info('Emulator killing is async; give a few seconds for all to die.') |
for _ in range(5): |
- if not any(d.adb.is_emulator for d in device_utils.HealthyDevices()): |
+ if not any(d.adb.is_emulator for d |
+ in device_utils.DeviceUtils.HealthyDevices()): |
return |
time.sleep(1) |
@@ -140,7 +142,8 @@ class PortPool(object): |
def _GetAvailablePort(): |
"""Returns an available TCP port for the console.""" |
used_ports = [] |
- emulators = [d for d in device_utils.HealthyDevices() if d.adb.is_emulator] |
+ emulators = [d for d in device_utils.DeviceUtils.HealthyDevices() |
+ if d.adb.is_emulator] |
for emulator in emulators: |
used_ports.append(emulator.adb.GetDeviceSerial().split('-')[1]) |
for port in PortPool.port_range(): |