summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/status_script.py6
-rw-r--r--scripts/sub_api.py3
2 files changed, 7 insertions, 2 deletions
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():
diff --git a/scripts/sub_api.py b/scripts/sub_api.py
index 31fa3c9..959359f 100644
--- a/scripts/sub_api.py
+++ b/scripts/sub_api.py
@@ -24,7 +24,8 @@ try:
door_status = status_json["door.lock"]["text"]
sublab_status["open"] = status_dict[door_status]
except Exception:
- sys.excepthook(*sys.exc_info())
+ pass
+ #sys.excepthook(*sys.exc_info())
#atomically place new status
new_output_file = output_file + '.new'