[Git][NTPsec/ntpsec][master] In ntpmon, correct clock variables display.

Eric S. Raymond gitlab at mg.gitlab.com
Sun Dec 18 15:29:17 UTC 2016


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
5ffaa3d1 by Eric S. Raymond at 2016-12-18T10:29:07-05:00
In ntpmon, correct clock variables display.

- - - - -


1 changed file:

- ntpclients/ntpmon


Changes:

=====================================
ntpclients/ntpmon
=====================================
--- a/ntpclients/ntpmon
+++ b/ntpclients/ntpmon
@@ -218,14 +218,15 @@ if __name__ == '__main__':
                                 dtype = ntp.ntpc.TYPE_CLOCK
                             else:
                                 dtype = ntp.ntpc.TYPE_PEER
-                            sw = ntp.ntpc.statustoa(dtype, peers[i].status)
+                            sw = ntp.ntpc.statustoa(dtype,
+                                                    peers[selected].status)
                             stdscr.addstr("assoc=%d: %s\n" \
-                                          % (peers[i].associd, sw))
+                                          % (peers[selected].associd, sw))
                             stdscr.addstr(peer_detail(retained))
                             try:
-                                clockvars = session.readvar(peer.associd, opcode=ntp.control.CTL_OP_READCLOCK)
+                                clockvars = session.readvar(peers[selected].associd, opcode=ntp.control.CTL_OP_READCLOCK)
                                 stdscr.addstr(ntp.util.cook(clockvars))
-                            except ntp.packet.ControlException:
+                            except ntp.packet.ControlException as e:
                                 pass
                         elif span.entries:
                             stdscr.addstr(ntp.util.MRUSummary.header + "\n",



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/5ffaa3d1f54d831e905113dfda7ba141ece17bb3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20161218/4a40cf3a/attachment.html>


More information about the vc mailing list