[Git][NTPsec/ntpsec][master] 3 commits: PEP8: E703 statement ends with a semicolon

Eric S. Raymond gitlab at mg.gitlab.com
Mon Nov 7 04:00:34 UTC 2016


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


Commits:
724b7043 by Matt Selsky at 2016-11-06T21:19:00-05:00
PEP8: E703 statement ends with a semicolon

- - - - -
78156355 by Matt Selsky at 2016-11-06T21:19:00-05:00
Fix asciidoc syntax to match the italics used in the rest of the document

- - - - -
43acbf08 by Matt Selsky at 2016-11-06T21:19:00-05:00
Remove unused imports from ntpq

- - - - -


3 changed files:

- docs/includes/auth-commands.txt
- ntpq/ntpq
- pylib/packet.py


Changes:

=====================================
docs/includes/auth-commands.txt
=====================================
--- a/docs/includes/auth-commands.txt
+++ b/docs/includes/auth-commands.txt
@@ -20,7 +20,7 @@
     Specifies the location of the required host public certificate file.
     This overrides the link _ntpkey_cert_hostname_ in the keys
     directory.
-  +digest+ 'digest';;
+  +digest+ _digest_;;
     Specify the message digest algorithm, with default MD5. If the
     OpenSSL library is installed, +digest+ can be be any message digest
     algorithm supported by the library. The current selections are:


=====================================
ntpq/ntpq
=====================================
--- a/ntpq/ntpq
+++ b/ntpq/ntpq
@@ -11,8 +11,8 @@
 # SPDX-License-Identifier: BSD-2-clause
 from __future__ import print_function, division
 
-import os, sys, getopt, cmd, errno, curses, curses.ascii, re
-import socket, select, struct, shlex, time, hashlib
+import os, sys, getopt, cmd, re
+import socket, hashlib
 
 from ntp.packet import *
 from ntp.util import *
@@ -198,12 +198,12 @@ usage: help [ command ]
         return True
 
     def __printassoc(self, showall):
-        condition = "";
+        condition = ""
         if not self.peers:
-            self.say("No association IDs in list\n");
-            return;
-        self.say("\nind assid status  conf reach auth condition  last_event cnt\n");
-        self.say("===========================================================\n");
+            self.say("No association IDs in list\n")
+            return
+        self.say("\nind assid status  conf reach auth condition  last_event cnt\n")
+        self.say("===========================================================\n")
         for (i, peer) in enumerate(self.peers):
             statval = CTL_PEER_STATVAL(peer.status)
             if not showall and (statval & (CTL_PST_CONFIG|CTL_PST_REACH)) == 0:
@@ -442,7 +442,7 @@ usage: help [ command ]
 	 # if we're asking for specific variables don't include the
 	 # status header line in the output.
 	if self.old_rv:
-            quiet = False;
+            quiet = False
 	else:
             quiet = not (not varlist)	# nonempty?
         try:
@@ -465,9 +465,9 @@ usage: help [ command ]
 				associd))
             return True
 	if not quiet:
-            self.say("associd=%d " % associd);
+            self.say("associd=%d " % associd)
 	self.printvars(variables, type, quiet)
-	return True;
+	return True
 
     # Unexposed helper tables and functions end here
 


=====================================
pylib/packet.py
=====================================
--- a/pylib/packet.py
+++ b/pylib/packet.py
@@ -488,7 +488,7 @@ class Mode6Session:
         # Do the encryption.
         hasher = hashlib.new(self.keytype)
         hasher.update(self.passwd)
-	hasher.update(pkt.flatten());
+	hasher.update(pkt.flatten())
         if hasher.digest_size == 0:
             raise Mode6Exception(SERR_NOKEY)
         else:
@@ -606,7 +606,7 @@ class Mode6Session:
                 raise Mode6Exception(SERR_INCOMPLETE)
 
             if self.debug > 1:
-                warn("Got packet, size = %d\n"% len(rawdata));
+                warn("Got packet, size = %d\n"% len(rawdata))
             if rpkt.count > (len(rawdata) - Packet.HEADER_LEN):
                     warn("Received count of %u octets, data in packet is %ld\n"\
                                    % (count, len(rawdata) - Packet.HEADER_LEN))
@@ -821,7 +821,7 @@ class Mode6Session:
             # Form the initial request
             #next_report = time.time() + MRU_REPORT_SECS
             limit = min(3 * MAXFRAGS, self.ntpd_row_limit)
-            frags = MAXFRAGS;
+            frags = MAXFRAGS
             req_buf = "%s, frags=%d" % (nonce, frags)
             if variables:
                 parms = ", " + ",".join([("%s=%s" % it) for it in list(variables.items())])
@@ -854,9 +854,9 @@ class Mode6Session:
                         raise e
                     elif e.errorcode == CERR_BADVALUE:
                         if cap_frags:
-                            cap_frags = False;
+                            cap_frags = False
                             if self.debug:
-                                warn("Reverted to row limit from fragments limit.\n");
+                                warn("Reverted to row limit from fragments limit.\n")
 			else:
                             # ntpd has lower cap on row limit
                             self.ntpd_row_limit -= 1
@@ -871,7 +871,7 @@ class Mode6Session:
                             if self.debug:
                                 warn("Frag limit reduced to %d following incomplete response.\n"% frags)
 			else:
-                            limit = max(2, limit / 2);
+                            limit = max(2, limit / 2)
                             if self.debug:
                                 warn("Row limit reduced to %d following incomplete response.\n" % limit)
                     elif e.errorcode:



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/eca957afddff38f1c4a0d7368d14ec67d4248aaf...43acbf0838f6233f964b31a0f72ea0b1c6e96c04
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161107/26b028b8/attachment.html>


More information about the vc mailing list