summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Franke <nobody@nowhere.ws>2013-06-20 02:49:45 +0200
committerChristian Franke <nobody@nowhere.ws>2013-06-20 02:56:52 +0200
commit0e330e9504dfba0df5136ceb72f3f964ab8dd6db (patch)
treef20aff02a33a3e526fecb8a7fac0f70f89beb177
parent15fb6f7b6e4f6f6a071af9e794ccf80a8f804d8a (diff)
Don't spam me no more
-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'