diff py/fridge.py @ 197:3f187baa3439

Fix invalid wort time check
author Matt Johnston <matt@ucc.asn.au>
date Tue, 04 Mar 2014 22:01:25 +0800
parents 77c2a9caca3d
children 16a83e2c97a0
line wrap: on
line diff
--- a/py/fridge.py	Wed Feb 12 20:57:30 2014 +0800
+++ b/py/fridge.py	Tue Mar 04 22:01:25 2014 +0800
@@ -83,9 +83,8 @@
 
         # handle broken wort sensor
         if wort is None:
-            self.wort_valid_clock = self.server.now()
-            W("Invalid wort sensor")
             invalid_time = self.server.now() - self.wort_valid_clock
+            W("Invalid wort sensor for %d secs" % invalid_time)
             if invalid_time < config.FRIDGE_WORT_INVALID_TIME:
                 W("Has only been invalid for %d, waiting" % invalid_time)
                 return