[Git][NTPsec/ntpsec][master] Don't blow up on weird peerstats clock names.
Gary E. Miller
gitlab at mg.gitlab.com
Thu Sep 8 06:39:54 UTC 2016
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
91250eeb by Gary E. Miller at 2016-09-07T23:38:57-07:00
Don't blow up on weird peerstats clock names.
- - - - -
1 changed file:
- ntpstats/ntpviz
Changes:
=====================================
ntpstats/ntpviz
=====================================
--- a/ntpstats/ntpviz
+++ b/ntpstats/ntpviz
@@ -309,7 +309,12 @@ plot \
if "(" in key or "::" in key:
ip = key
else:
- ip = socket.gethostbyname(key)
+ try:
+ ip = socket.gethostbyname(key)
+ except:
+ # ignore it
+ ip = key
+
if ip in peerdict:
plot_data += "\n".join(peerdict[ip]) + "\ne\n"
else:
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/91250eeb3cc900e96b5746ac2aad42fc5f83714f
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160908/2ee9658f/attachment.html>
More information about the vc
mailing list