[Git][NTPsec/ntpsec][master] ntpq checkpoint: cooked readvars output without line folding.
Eric S. Raymond
gitlab at mg.gitlab.com
Wed Oct 26 10:07:17 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
08653bf6 by Eric S. Raymond at 2016-10-26T06:06:40-04:00
ntpq checkpoint: cooked readvars output without line folding.
- - - - -
1 changed file:
- ntpq/pyntpq
Changes:
=====================================
ntpq/pyntpq
=====================================
--- a/ntpq/pyntpq
+++ b/ntpq/pyntpq
@@ -441,7 +441,6 @@ usage: help [ command ]
else:
return True
-
def __dogetpeers(self, header, associd, af):
try:
variables = self.session.readvar(associd)
@@ -534,9 +533,7 @@ usage: help [ command ]
(self.session.rstatus,
statustoa(dtype, self.session.rstatus)))
- out_chars = 0
text = ""
- print(variables)
for (name, value) in variables.items():
item = "%s=" % name
if name in ("reftime", "clock", "org", "rec", "xmt"):
@@ -581,12 +578,10 @@ usage: help [ command ]
item = item[:-1]
else:
item += repr(value)
- item += ","
- if len(text + item) > 78:
- text += "\n"
- else:
- text += " "
+ item += ", "
+ text += item
text = text[:-2] + "\n"
+ text = text.replace("'", '"')
self.say(text)
def __dolist(self, varlist, associd, op, type):
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/08653bf607cf144a77529080e5eb7572fc36bc90
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161026/397ac904/attachment.html>
More information about the vc
mailing list