Fix dbus+UPower battery support

This commit is contained in:
Foo 2015-08-08 01:10:57 +03:00
parent f098ed2fe0
commit d02b8e9825
1 changed files with 6 additions and 4 deletions

View File

@ -51,10 +51,12 @@ def _fetch_battery_info(pl):
pl.debug('Not using DBUS+UPower with {0}: not a power supply', devpath)
continue
pl.debug('Using DBUS+UPower with {0}', devpath)
return lambda pl: float(
dbus.Interface(dev, dbus_interface=devinterface).Get(
devtype_name,
'Percentage'
return lambda pl: (
float(
dbus.Interface(dev, dbus_interface=devinterface).Get(
devtype_name,
'Percentage'
),
),
dbus.Interface(dev, dbus_interface=devinterface).Get(
devtype_name,