From 7e319f2edecc1623e753c1d929d848a96359d7b4 Mon Sep 17 00:00:00 2001 From: Micha Gorelick Date: Sun, 21 Feb 2016 00:19:17 -0500 Subject: [PATCH] filename bugfix Filename reference in `/sys/` method for the battery segment referenced a non-existant file. --- powerline/segments/common/bat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/powerline/segments/common/bat.py b/powerline/segments/common/bat.py index 160d9430..a0b89245 100644 --- a/powerline/segments/common/bat.py +++ b/powerline/segments/common/bat.py @@ -77,8 +77,8 @@ def _fetch_battery_info(pl): pl.debug('Not using DBUS+UPower as no batteries were found') if os.path.isdir('/sys/class/power_supply'): - linux_energy_full_fmt = '/sys/class/power_supply/{0}/enery_full' - linux_energy_fmt = '/sys/class/power_supply/{0}/enery' + linux_energy_full_fmt = '/sys/class/power_supply/{0}/energy_full' + linux_energy_fmt = '/sys/class/power_supply/{0}/energy_now' linux_status_fmt = '/sys/class/power_supply/{0}/status' devices = [] for linux_supplier in os.listdir('/sys/class/power_supply'):