[Git][NTPsec/ntpsec][master] 4 commits: Fix missing dot after self

Eric S. Raymond gitlab at mg.gitlab.com
Thu Nov 10 13:49:31 UTC 2016


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


Commits:
a29515de by Matt Selsky at 2016-11-10T08:49:14-05:00
Fix missing dot after self

- - - - -
3fa3e6a0 by Matt Selsky at 2016-11-10T08:49:14-05:00
Fix syntax error in sendrequest() and actually include data size.

- - - - -
131ee79e by Matt Selsky at 2016-11-10T08:49:14-05:00
Typo

- - - - -
f26284b6 by Matt Selsky at 2016-11-10T08:49:14-05:00
Include the message of why the import of the ntp modules failed

- - - - -


4 changed files:

- libntp/pymodule.c
- ntpq/ntpq
- ntpstats/ntpviz
- pylib/packet.py


Changes:

=====================================
libntp/pymodule.c
=====================================
--- a/libntp/pymodule.c
+++ b/libntp/pymodule.c
@@ -113,7 +113,7 @@ static PyMethodDef ntpc_methods[] = {
     {"lfptofloat",     	ntpc_lfptofloat,  	METH_VARARGS,
      PyDoc_STR("NTP l_fp to Python-style float time.")},
     {"set_tod",     	ntpc_set_tod,   	METH_VARARGS,
-     PyDoc_STR("Set time to nanosecind precision.")},
+     PyDoc_STR("Set time to nanosecond precision.")},
     {NULL,		NULL, 0, NULL}		/* sentinel */
 };
 


=====================================
ntpq/ntpq
=====================================
--- a/ntpq/ntpq
+++ b/ntpq/ntpq
@@ -19,8 +19,9 @@ try:
     from ntp.util import *
     from ntp.ntpc import *
     import ntp.version
-except ImportError:
+except ImportError as e:
     sys.stderr.write("ntpq: can't find Python NTP library -- check PYTHONPATH.\n")
+    sys.stderr.write("%s\n" % e.message)
     sys.exit(1)
 
 # This import only works on Unixes.  The intention is to enable
@@ -976,7 +977,7 @@ usage: writevar assocID name=value,[...]
         for associd in idrange:
             if (associd != idrange[0]):
                 self.say("\n")
-            if not self__dolist(self.uservars,
+            if not self.__dolist(self.uservars,
                                 associd, CTL_OP_READVAR, TYPE_PEER):
                 return
 
@@ -1011,7 +1012,7 @@ usage: mrl assocIDlow assocIDhigh
         for associd in idrange:
             if (associd != idrange[0]):
                 self.say("\n")
-            if not self__dolist(varlist, associd, CTL_OP_READVAR, TYPE_PEER):
+            if not self.__dolist(varlist, associd, CTL_OP_READVAR, TYPE_PEER):
                 return
 
     def help_mreadvar(self):


=====================================
ntpstats/ntpviz
=====================================
--- a/ntpstats/ntpviz
+++ b/ntpstats/ntpviz
@@ -43,8 +43,9 @@ import tempfile
 try:
     from ntp.statfiles import *
     import ntp.util
-except ImportError:
+except ImportError as e:
     sys.stderr.write("ntpviz: can't find Python NTP library -- check PYTHONPATH.\n")
+    sys.stderr.write("%s\n" % e.message)
     sys.exit(1)
 
 # overload ArgumentParser


=====================================
pylib/packet.py
=====================================
--- a/pylib/packet.py
+++ b/pylib/packet.py
@@ -571,8 +571,7 @@ class Mode6Session:
         "Ship an ntpq request packet to a server."
         # Check to make sure the data will fit in one packet
         if len(qdata) > CTL_MAX_DATA_LEN:
-            sys.stderr/write(stderr,
-                             "***Internal error! Data too long\n",
+            sys.stderr.write("***Internal error! Data too large (%d)\n" %
                              len(qdata))
             return -1
 



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/49081e75d5139f642a577078388084af5d2b6681...f26284b6d07b2d3eb88e6c2c0a84bdfc84f714d4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161110/3a92095c/attachment.html>


More information about the vc mailing list