From 0e330e9504dfba0df5136ceb72f3f964ab8dd6db Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Thu, 20 Jun 2013 02:49:45 +0200 Subject: Don't spam me no more --- scripts/status_script.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts/status_script.py') diff --git a/scripts/status_script.py b/scripts/status_script.py index 29a1e97..a92d5bf 100755 --- a/scripts/status_script.py +++ b/scripts/status_script.py @@ -17,7 +17,11 @@ class SublabStatus(object): return self.json def door_status(self): - self.get_json() + try: + self.get_json() + except Exception: + return 'unkown' + door_status = self.json['door.lock'] if door_status['ts'] + 120 < time.time(): -- cgit v1.2.1