diff options
author | Britney Fransen <brfransen@gmail.com> | 2018-01-17 23:13:21 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2018-01-17 23:13:21 (GMT) |
commit | 9e95ff3bd07b6f67dca9e5b0bc77499b5af71c13 (patch) | |
tree | 0b690f9f842bbf7eb1e61885b74e9375d427cdfd /abs/core/supplemental-web | |
parent | d3bcf5aad566eddc2514d84c148ed1f7d0ee4033 (diff) | |
download | linhes_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')
-rw-r--r-- | abs/core/supplemental-web/PKGBUILD | 2 | ||||
-rw-r--r-- | abs/core/supplemental-web/contents/fe_status.py | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/abs/core/supplemental-web/PKGBUILD b/abs/core/supplemental-web/PKGBUILD index 4fcef9e..b68c9e7 100644 --- a/abs/core/supplemental-web/PKGBUILD +++ b/abs/core/supplemental-web/PKGBUILD @@ -1,7 +1,7 @@ pkgbase=supplemental-web pkgname=('supplemental-web' 'supplemental-web-slave') pkgver=8.5 -pkgrel=1 +pkgrel=2 arch=('i686' 'x86_64') license=('GPL') backup=('data/srv/httpd/cgi/extra.cfg.txt') 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 |