diff --git a/lib/oven.py b/lib/oven.py index 4a1f5b0..5d0f0ef 100644 --- a/lib/oven.py +++ b/lib/oven.py @@ -128,7 +128,8 @@ class TempSensorReal(TempSensor): except Exception: log.exception("problem reading temp") time.sleep(sleeptime) - self.temperature = sum(temps)/len(temps) + if len(temps) > 0: + self.temperature = sum(temps)/len(temps) class Oven(threading.Thread): '''parent oven class. this has all the common code