diff py/fridge.py @ 531:fd0fd9f947a1

improve exception handling
author Matt Johnston <matt@ucc.asn.au>
date Sat, 11 Apr 2015 21:09:13 +0800
parents dd8895652485
children 19569cb5ed46
line wrap: on
line diff
--- a/py/fridge.py	Sat Apr 11 00:16:05 2015 +0800
+++ b/py/fridge.py	Sat Apr 11 21:09:13 2015 +0800
@@ -36,7 +36,10 @@
             L("Fridge is disabled")
         while True:
             self.do()
-            yield from self.server.sleep(config.FRIDGE_SLEEP)
+            try:
+                yield from self.server.sleep(config.FRIDGE_SLEEP)
+            except Exception as e:
+                EX("fridge failed")
 
     def do(self):
         """ this is the main fridge control logic """