summaryrefslogtreecommitdiffstats
path: root/abs/core/supplemental-web/contents
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2018-01-17 23:13:21 (GMT)
committerBritney Fransen <brfransen@gmail.com>2018-01-17 23:13:21 (GMT)
commit9e95ff3bd07b6f67dca9e5b0bc77499b5af71c13 (patch)
tree0b690f9f842bbf7eb1e61885b74e9375d427cdfd /abs/core/supplemental-web/contents
parentd3bcf5aad566eddc2514d84c148ed1f7d0ee4033 (diff)
downloadlinhes_pkgbuild-9e95ff3bd07b6f67dca9e5b0bc77499b5af71c13.zip
linhes_pkgbuild-9e95ff3bd07b6f67dca9e5b0bc77499b5af71c13.tar.gz
linhes_pkgbuild-9e95ff3bd07b6f67dca9e5b0bc77499b5af71c13.tar.bz2
supplemental-web: fe_status.py: trap error if ip isn't found
Diffstat (limited to 'abs/core/supplemental-web/contents')
-rw-r--r--abs/core/supplemental-web/contents/fe_status.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/abs/core/supplemental-web/contents/fe_status.py b/abs/core/supplemental-web/contents/fe_status.py
index 439d0c5..c66d8f9 100644
--- a/abs/core/supplemental-web/contents/fe_status.py
+++ b/abs/core/supplemental-web/contents/fe_status.py
@@ -67,11 +67,14 @@ def mythfe_status(cursor,mythDB):
fe_hostname = socket.gethostbyaddr(i)[0]
except:
#print "DNS lookup failed for %s" %i
- fe_hostname = socket.gethostbyname(i)
- ip_addr = socket.gethostbyname(i)
- fe_hostname = "%s (%s)" %(fe_hostname,ip_addr)
- status_dict[fe_hostname] = parse_xml(ip_addr)
-
+ fe_hostname = i
+ try:
+ ip_addr = socket.gethostbyname(i)
+ fe_hostname = "%s (%s)" %(fe_hostname,ip_addr)
+ status_dict[fe_hostname] = parse_xml(ip_addr)
+ except:
+ fe_hostname = "%s" %fe_hostname
+ status_dict[fe_hostname] = parse_xml(fe_hostname)
return status_dict