diff --git a/bumblebee_status/modules/contrib/battery.py b/bumblebee_status/modules/contrib/battery.py index 7c656426..daaa89bb 100644 --- a/bumblebee_status/modules/contrib/battery.py +++ b/bumblebee_status/modules/contrib/battery.py @@ -58,6 +58,8 @@ def capacity(self, battery): capacity = self.read(battery, "capacity", 100) if capacity != "n/a": capacity = int(capacity) + else: + capacity = 0 return capacity if capacity < 100 else 100