[Android] Fall back to active_devices if the known device list file is empty.

BUG=v8:5098

Review-Url: https://codereview.chromium.org/2070043002
Cr-Original-Commit-Position: refs/heads/master@{#400018}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 88778e91c8f95c4e08eaa35de38017a6061c16d2
This commit is contained in:
jbudorick 2016-06-15 14:46:24 -07:00 коммит произвёл Commit bot
Родитель b4042584e2
Коммит 1da4347051
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -28,6 +28,10 @@ def _GetAllDevices(active_devices, devices_path):
if devices_path:
devices = [device_utils.DeviceUtils(s)
for s in device_list.GetPersistentDeviceList(devices_path)]
if not devices and active_devices:
logging.warning('%s is empty. Falling back to active devices.',
devices_path)
devices = active_devices
else:
logging.warning('Known devices file path not being passed. For device '
'affinity to work properly, it must be passed.')