Strange. That shouldn't be possible (I assume you're on AC so discharge rate is zero). However in the interest of stability, I'll add a check for non-zero totalRate.
You can patch this easily enough:
if totalRate:
time = totalCapacity / totalRate
else:
time = totalCapacity
#according to the comments this has # no real meaning when charging.
Strange. That shouldn't be
Strange. That shouldn't be possible (I assume you're on AC so discharge rate is zero). However in the interest of stability, I'll add a check for non-zero totalRate.
You can patch this easily enough: