| Index: build/android/buildbot/bb_device_status_check.py
|
| diff --git a/build/android/buildbot/bb_device_status_check.py b/build/android/buildbot/bb_device_status_check.py
|
| index 94c741fe13d739da9e949e28dd0125b290dc889e..d064633ae94aaf0ba1d2623d15e6093f1742316a 100755
|
| --- a/build/android/buildbot/bb_device_status_check.py
|
| +++ b/build/android/buildbot/bb_device_status_check.py
|
| @@ -63,6 +63,12 @@ def DeviceInfo(serial, options):
|
| return lambda_function(found[0])
|
| return 'Unknown'
|
|
|
| + def _GetBatteryInfo(battery):
|
| + if not battery:
|
| + return 'No battery info.'
|
| + battery_info = battery.split('\n')
|
| + return battery_info[0] + '\n '.join(battery_info[1:])
|
| +
|
| ac_power = _GetData('AC powered: (\w+)', battery)
|
| battery_level = _GetData('level: (\d+)', battery)
|
| imei_slice = _GetData('Device ID = (\d+)',
|
| @@ -71,7 +77,7 @@ def DeviceInfo(serial, options):
|
| report = ['Device %s (%s)' % (serial, device_type),
|
| ' Build: %s (%s)' %
|
| (device_build, device_adb.old_interface.GetBuildFingerprint()),
|
| - ' %s' % '\n '.join(battery.split('\n')),
|
| + ' %s' % _GetBatteryInfo(battery),
|
| ' IMEI slice: %s' % imei_slice,
|
| ' Wifi IP: %s' % device_adb.old_interface.GetWifiIP(),
|
| '']
|
|
|