Skip to content
Snippets Groups Projects
Commit f4fd9091 authored by Eric S. Raymond's avatar Eric S. Raymond
Browse files

Workaround GitLab issue #210: detail mode on remote host crashes ntpmon

parent 3db967af
No related branches found
No related tags found
No related merge requests found
......@@ -70,9 +70,11 @@ def peer_detail(variables):
vcopy = {}
vcopy.update(variables)
vcopy["leap"] = ("no-leap", "add-leap", "del-leap", "unsync")[vcopy["leap"]]
vcopy['xmt'] = ntp.util.rfc3339(ntp.ntpc.lfptofloat(vcopy['xmt']))
vcopy['rec'] = ntp.util.rfc3339(ntp.ntpc.lfptofloat(vcopy['rec']))
vcopy['reftime'] = ntp.util.rfc3339(ntp.ntpc.lfptofloat(vcopy['reftime']))
for fld in ('xmt', 'rec', 'reftime'):
if fld not in vcopy:
vcopy[fld] = "***missing***"
else:
vcopy[fld] = ntp.util.rfc3339(ntp.ntpc.lfptofloat(vcopy[fld]))
vcopy['filtdelay'] = vcopy['filtdelay'].replace(' ', '\t')
vcopy['filtoffset'] = vcopy['filtoffset'].replace(' ', '\t')
vcopy['filtdisp'] = vcopy['filtdisp'].replace(' ', '\t')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment