Handle error in batteries.go in battery.GetAll(), maybe it is bad idea

This commit is contained in:
eleksir
2026-03-31 01:02:17 +03:00
parent 4beda1639e
commit f59ac30f51

View File

@@ -104,9 +104,13 @@ func (c *MyConfig) UpdateBatteryInfo() {
} }
} }
} else { } else {
// In theory, this module should give for each entry its separate err, but in practice it gives var err error
// one single err for all entries, so we cannot detemine whist exatly entry errored.
batteries, _ = battery.GetAll() batteries, err = battery.GetAll()
if err != nil {
log.Printf("Unable to get battery info: %s", err)
}
} }
var ( var (