Chromium Code Reviews| 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..d575d0dded6072bd5157fdadc761cca94af93848 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 battery: |
|
bulach
2014/05/14 10:10:49
nit: perhaps like _GetData above, it saves one ind
|
| + battery_info = battery.split('\n') |
| + return battery_info[0] + '\n '.join(battery_info[1:]) |
| + return '' |
| + |
| 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(), |
| ''] |