[Git][NTPsec/ntpsec][master] Address GitLab issue #383: ntpq: invalid file argument ignored

Eric S. Raymond gitlab at mg.gitlab.com
Sat Sep 9 19:13:49 UTC 2017


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


Commits:
822dfda4 by Eric S. Raymond at 2017-09-09T19:13:39+00:00
Address GitLab issue #383: ntpq: invalid file argument ignored

- - - - -


2 changed files:

- ntpclients/ntpdig
- ntpclients/ntpq


Changes:

=====================================
ntpclients/ntpdig
=====================================
--- a/ntpclients/ntpdig
+++ b/ntpclients/ntpdig
@@ -367,7 +367,8 @@ if __name__ == '__main__':
         try:
             credentials = ntp.packet.Authenticator(keyfile)
         except (OSError, IOError):
-            pass
+            sys.stderr.write("ntpdig: %s nonexistent or unreadable\n" % keyfile)
+            raise SystemExit(1)
         if credentials:
             try:
                 (keyid, keytype, passwd) = credentials.control(authkey)


=====================================
ntpclients/ntpq
=====================================
--- a/ntpclients/ntpq
+++ b/ntpclients/ntpq
@@ -1686,7 +1686,8 @@ if __name__ == '__main__':
         try:
             credentials = ntp.packet.Authenticator(keyfile)
         except (OSError, IOError):
-            pass
+            sys.stderr.write("ntpq: %s nonexistent or unreadable\n" % keyfile)
+            raise SystemExit(1)
         if credentials:
             session.auth = credentials
     if keyid is not None:  # Have an -a



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/822dfda437f064a36d8796bba33aaaf9ba8faad8

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/822dfda437f064a36d8796bba33aaaf9ba8faad8
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/20170909/4540b7fe/attachment.html>


More information about the vc mailing list