[Git][NTPsec/ntpsec][master] ntpq: -c rv should return associd only when variable(s) not passed.

James Browning (@jamesb_fe80) gitlab at mg.gitlab.com
Tue Mar 23 17:41:23 UTC 2021



James Browning pushed to branch master at NTPsec / ntpsec


Commits:
cce9e9a3 by James Browning at 2021-03-23T17:31:39+00:00
ntpq: -c rv should return associd only when variable(s) not passed.

- - - - -


1 changed file:

- ntpclients/ntpq.py


Changes:

=====================================
ntpclients/ntpq.py
=====================================
@@ -981,9 +981,10 @@ usage: writelist [ assocID ]
         associd = self.__assoc_valid(line)
         if associd >= 0:
             qtype = ntp.ntpc.TYPE_SYS if associd == 0 else ntp.ntpc.TYPE_PEER
+            silence = bool(len(line.split()) >= 2)
             # Some scripts written for C ntpq need associd printed here
             self.__dolist(line.split()[1:], associd,
-                          ntp.control.CTL_OP_READVAR, qtype)
+                          ntp.control.CTL_OP_READVAR, qtype, quiet=silence)
 
     def help_readvar(self):
         self.say("""\



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/cce9e9a3c426a4e3b47b05f55c2ab7b25c10d6b8

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/cce9e9a3c426a4e3b47b05f55c2ab7b25c10d6b8
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/20210323/1d7a9bbe/attachment.htm>


More information about the vc mailing list