Fix incorrect use of partial

Fixes 
This commit is contained in:
ZyX 2014-08-22 00:30:29 +04:00
parent 0ea1cd6f7b
commit a50b488042
1 changed files with 6 additions and 6 deletions
powerline/segments

View File

@ -9,7 +9,6 @@ import socket
from datetime import datetime
from multiprocessing import cpu_count as _cpu_count
from functools import partial
from powerline.lib import add_divider_highlight_group
from powerline.lib.shell import asrun, run_cmd
@ -1142,11 +1141,12 @@ def _get_battery(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(partial(
dbus.Interface(dev, dbus_interface=devinterface).Get,
devtype_name,
'Percentage'
))
return lambda pl: float(
dbus.Interface(dev, dbus_interface=devinterface).Get(
devtype_name,
'Percentage'
)
)
pl.debug('Not using DBUS+UPower as no batteries were found')
if os.path.isdir('/sys/class/power_supply'):