[modules/battery] fix syntax error

see #221
This commit is contained in:
Tobias Witek 2018-01-11 20:26:49 +01:00
parent 166437649c
commit 5f96b603a8

View file

@ -105,8 +105,9 @@ class Module(bumblebee.engine.Module):
state.append("AC") state.append("AC")
else: else:
charge = "" charge = ""
with open("{}/status".format(widget.name)) as f: try:
charge = f.read().strip() with open("{}/status".format(widget.name)) as f:
charge = f.read().strip()
except IOError: except IOError:
pass pass
if charge == "Discharging": if charge == "Discharging":