[Git][NTPsec/ntpsec][master] 2 commits: Make sure to pass a keytype to the error messages

Eric S. Raymond gitlab at mg.gitlab.com
Mon Nov 28 18:57:14 UTC 2016


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


Commits:
099ced20 by Matt Selsky at 2016-11-28T12:11:26-05:00
Make sure to pass a keytype to the error messages

- - - - -
b9af551b by Matt Selsky at 2016-11-28T12:11:26-05:00
Fix syntax error for format string

- - - - -


1 changed file:

- ntpq/ntpq


Changes:

=====================================
ntpq/ntpq
=====================================
--- a/ntpq/ntpq
+++ b/ntpq/ntpq
@@ -338,7 +338,7 @@ usage: help [ command ]
                 return
             if not variables:
                 if len(self.chosts) > 1:
-                    self.warn("server=%s ", self.session.hostname)
+                    self.warn("server=%s " % self.session.hostname)
                 self.warn("***No information returned for association %d\n" \
                                  % associd)
                 continue
@@ -800,9 +800,9 @@ usage: ntpversion [ version number ]
         if not line:
             self.say("Keytype: %s\n" % self.session.keytype)
         elif not line in "DSA, DSA-SHA, MD4, MD5, MDC2, RIPEMD160, SHA, SHA1":
-            self.warn("Keytype %s is not supported by ntpd.")
+            self.warn("Keytype %s is not supported by ntpd.\n" % line)
         elif line not in hashlib.algorithms_available:
-            self.warn("Keytype %s is not supported by ntpq.")
+            self.warn("Keytype %s is not supported by ntpq.\n" % line)
         else:
             self.session.keytype = line
 



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/bea67d8f23c3981dbe661d3df9bbd8c9880e783b...b9af551b537fd9212d10c76c404c73d8b8da86f7
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161128/eee4335c/attachment.html>


More information about the vc mailing list