summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristian Franke <nobody@nowhere.ws>2015-05-11 06:34:06 +0200
committerChristian Franke <nobody@nowhere.ws>2015-05-11 06:34:06 +0200
commita2a8d4d14981607349897da6e52464aad6b3689f (patch)
treed3b9e086224729d327c187309d0d55875fb3529f /scripts
parentd81ddb9d7210040fdacd218c4f089d56ef0ab40c (diff)
Add fix ip for doorstatus as dns is currently v6 only
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/status_script.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/scripts/status_script.py b/scripts/status_script.py
index 1b30d01..cc247ec 100755
--- a/scripts/status_script.py
+++ b/scripts/status_script.py
@@ -14,10 +14,14 @@ class SublabStatus(object):
def get_json(self):
if self.json is not None:
return self.json
-
- with contextlib.closing(urllib.urlopen('http://beaglebone.local.sublab.org/')) as response:
- self.json = json.load(response)
- return self.json
+ try:
+ with contextlib.closing(urllib.urlopen('http://[2a02:238:f02a:9800:caa0:30ff:feb4:2185]/')) as response:
+ self.json = json.load(response)
+ return self.json
+ except IOError:
+ with contextlib.closing(urllib.urlopen('http://beaglebone.local.sublab.org/')) as response:
+ self.json = json.load(response)
+ return self.json
def door_status(self):
try: