[Git][NTPsec/ntpsec][master] Reverse the MRUlist presentation order in ntpq...
Eric S. Raymond
gitlab at mg.gitlab.com
Fri Dec 2 05:19:11 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
7246fca0 by Eric S. Raymond at 2016-12-02T00:18:52-05:00
Reverse the MRUlist presentation order in ntpq...
...not in the response processing.
- - - - -
1 changed file:
- ntpq/ntpq
Changes:
=====================================
ntpq/ntpq
=====================================
--- a/ntpq/ntpq
+++ b/ntpq/ntpq
@@ -1303,7 +1303,8 @@ usage: config_from_file <configuration filename>
formatter = ntp.util.MRUSummary(interpreter.showhostnames)
self.say(ntp.util.MRUSummary.header + "\n")
self.say(("=" * ntp.util.MRUSummary.width) + "\n")
- for entry in span.entries:
+ # reversed because we want the most recent entries at the top.
+ for entry in reversed(span.entries):
self.say(formatter.summary(entry) + "\n")
except ntp.packet.ControlException as e:
# Giving up after 8 restarts from the beginning.
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/7246fca066e3890fc991668741a3536de34eb790
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161202/1a3d224b/attachment.html>
More information about the vc
mailing list