[Git][NTPsec/ntpsec][master] 2 commits: ntpq: solve #689 - 'ntpq -c raw -c readvar' crashes ...
Matt Selsky
gitlab at mg.gitlab.com
Thu Jan 14 00:12:18 UTC 2021
Matt Selsky pushed to branch master at NTPsec / ntpsec
Commits:
a8e9f895 by James Browning at 2021-01-13T10:29:46-08:00
ntpq: solve #689 - 'ntpq -c raw -c readvar' crashes ...
----
File "/usr/sbin/ntpq", line 327, in printvars
text = ntp.poly.polystr(session.response.replace(
TypeError: replace() argument 1 must be str, not bytes
----
- - - - -
bfb31615 by James Browning at 2021-01-13T10:29:46-08:00
ntpq: solve #690 - ntpq does not print associd when 0 ...
Some scripts written for C ntpq require it however.
reverts 2d4a83fb 'Fix a minor g;itch reported by Hal.'
No evidence has arisen to the nature of the glitch.
- - - - -
1 changed file:
- ntpclients/ntpq.py
Changes:
=====================================
ntpclients/ntpq.py
=====================================
@@ -325,8 +325,7 @@ usage: help [ command ]
# files a bug, Mode 6 never seems to generate those in
# variable fetches.
text = ntp.poly.polystr(session.response.replace(
- ntp.poly.polybytes(",\r\n"),
- ntp.poly.polybytes(",\n")))
+ ",\r\n", ",\n"))
else:
if not quiet:
self.say("status=%04x %s,\n"
@@ -921,8 +920,9 @@ usage: writelist [ assocID ]
associd = self.__assoc_valid(line)
if associd >= 0:
qtype = ntp.ntpc.TYPE_SYS if associd == 0 else ntp.ntpc.TYPE_PEER
+ # Some scripts written for C ntpq need associd printed here
self.__dolist(line.split()[1:], associd,
- ntp.control.CTL_OP_READVAR, qtype, quiet=True)
+ ntp.control.CTL_OP_READVAR, qtype)
def help_readvar(self):
self.say("""\
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/compare/e355749411b053e2cc94890e4777d5d92aba4cac...bfb31615f3cc582ce83059fadf55d39500805218
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/compare/e355749411b053e2cc94890e4777d5d92aba4cac...bfb31615f3cc582ce83059fadf55d39500805218
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20210114/f8eb7c0e/attachment.htm>
More information about the vc
mailing list