[Git][NTPsec/ntpsec][arg-safety] Missed one!
Ian Bruene
gitlab at mg.gitlab.com
Thu May 11 20:32:00 UTC 2017
Ian Bruene pushed to branch arg-safety at NTPsec / ntpsec
Commits:
f2e05695 by Ian Bruene at 2017-05-11T15:31:38-05:00
Missed one!
- - - - -
1 changed file:
- ntpclients/ntpdig
Changes:
=====================================
ntpclients/ntpdig
=====================================
--- a/ntpclients/ntpdig
+++ b/ntpclients/ntpdig
@@ -319,7 +319,8 @@ if __name__ == '__main__':
sys.stderr.write("logfile open of %s failed.\n" % val)
raise SystemExit(1)
elif switch in ("-M", "--steplimit"):
- steplimit = int(val)
+ errmsg = "Error: -M parameter '%s' not a number\n"
+ steplimit = ntp.util.safeargcast(val, int, errmsg, usage)
elif switch in ("-p", "--samples"):
errmsg = "Error: -p parameter '%s' not a number\n"
samples = ntp.util.safeargcast(val, int, errmsg, usage)
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/f2e056955773f579fc68b14ec7d04b968159ba31
---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/f2e056955773f579fc68b14ec7d04b968159ba31
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/20170511/e5a18921/attachment.html>
More information about the vc
mailing list