[Git][NTPsec/ntpsec][master] Add module names to variables previous found via star imports

Eric S. Raymond gitlab at mg.gitlab.com
Mon Nov 14 19:19:35 UTC 2016


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


Commits:
b98ec8b2 by Matt Selsky at 2016-11-14T12:12:07-05:00
Add module names to variables previous found via star imports

Also fix a call to self.warn()

- - - - -


1 changed file:

- ntpq/ntpq


Changes:

=====================================
ntpq/ntpq
=====================================
--- a/ntpq/ntpq
+++ b/ntpq/ntpq
@@ -237,7 +237,7 @@ usage: help [ command ]
                 auth = "ok "
             else:
                 auth = "bad"
-            if self.pktversion > NTP_OLDVERSION:
+            if self.pktversion > ntp.packet.NTP_OLDVERSION:
                 seldict = {
                     ntp.packet.CTL_PST_SEL_REJECT: "reject",
                     ntp.packet.CTL_PST_SEL_SANE: "falsetick",
@@ -276,7 +276,7 @@ usage: help [ command ]
                 ntp.packet.PEVNT_NEWPEER: "sys_peer",
                 ntp.packet.PEVNT_CLOCK: "clock_alarm",
                 }
-            last_event = event_dict.get(PEER_EVENT|event, "")
+            last_event = event_dict.get(ntp.packet.PEER_EVENT|event, "")
             display = \
                      "%3d %5u  %04x   %3.3s  %4s  %4.4s %9.9s %11s %2lu" % \
                      (i + 1, peer.associd,
@@ -312,7 +312,7 @@ usage: help [ command ]
 		    not (ntp.packet.CTL_PEER_STATVAL(peer.status)
 		      & (ntp.packet.CTL_PST_CONFIG|ntp.packet.CTL_PST_REACH)):
                 if self.debug:
-                    self.warn(stderr, "eliding [%d]\n" % peer.associd)
+                    self.warn("eliding [%d]\n" % peer.associd)
                 continue
             try:
                 variables = self.session.readvar(peer.associd)
@@ -766,11 +766,11 @@ usage: authenticate [ yes|no ]
         else:
             try:
                 newversion = int(line)
-                if newversion >= NTP_OLDVERSION and newversion <= NTP_VERSION:
+                if newversion >= ntp.packet.NTP_OLDVERSION and newversion <= ntp.packet.NTP_VERSION:
                     self.pktversion = newversion
                 else:
                     print("versions %d to %d, please"
-                          % (NTP_OLDVERSION, NTP_VERSION))
+                          % (ntp.packet.NTP_OLDVERSION, ntp.packet.NTP_VERSION))
             except ValueError:
                 print("What?")
         print("NTP version being claimed is %d" % self.pktversion)
@@ -1299,9 +1299,9 @@ usage: ifstats
             if self.rawmode:
                 print(self.session.response)
             else:
-                formatter = ReslistSummary()
-                self.say(ReslistSummary.header)
-                self.say(("=" * ReslistSummary.width) + "\n")
+                formatter = ntp.util.ReslistSummary()
+                self.say(ntp.util.ReslistSummary.header)
+                self.say(("=" * ntp.util.ReslistSummary.width) + "\n")
                 for entry in entries:
                     self.say(formatter.summary(entry))
         except ntp.packet.ControlException as e:



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/b98ec8b2d837107b90e5d91970fc5ce84507dd18
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161114/69a57b64/attachment.html>


More information about the vc mailing list