[modules/battery_all] Set default capacity
If capacity cannot be read -> set it to -1 fixes #572
This commit is contained in:
parent
bb2c92732e
commit
929f4751c3
1 changed files with 1 additions and 1 deletions
|
@ -88,7 +88,7 @@ class Module(bumblebee.engine.Module):
|
|||
|
||||
def state(self, widget):
|
||||
state = []
|
||||
capacity = widget.get("capacity")
|
||||
capacity = widget.get("capacity", -1)
|
||||
|
||||
if capacity < 0:
|
||||
return ["critical", "unknown"]
|
||||
|
|
Loading…
Reference in a new issue