[Git][NTPsec/ntpsec][master] 4 commits: PEP8 fixes for calc_tickadj

Matt Selsky gitlab at mg.gitlab.com
Sat Apr 29 14:09:58 UTC 2017


Matt Selsky pushed to branch master at NTPsec / ntpsec


Commits:
36184afe by Matt Selsky at 2017-04-29T09:37:01-04:00
PEP8 fixes for calc_tickadj

22:1: E265 block comment should start with '# '
64:8: E221 multiple spaces before operator

- - - - -
331b2086 by Matt Selsky at 2017-04-29T09:42:57-04:00
PEP8 fixes for make-leap-seconds.py

15:11: E401 multiple imports on one line
89:3: E111 indentation is not a multiple of four
90:3: E111 indentation is not a multiple of four
91:3: E111 indentation is not a multiple of four
92:3: E111 indentation is not a multiple of four
96:3: E111 indentation is not a multiple of four
97:3: E111 indentation is not a multiple of four
98:3: E111 indentation is not a multiple of four
99:3: E111 indentation is not a multiple of four
103:7: E225 missing whitespace around operator
135:29: E502 the backslash is redundant between brackets
136:2: E128 continuation line under-indented for visual indent

- - - - -
ef3e42b4 by Matt Selsky at 2017-04-29T10:01:25-04:00
Update a few more references ":config" -> "config"

- - - - -
7c1cb7ed by Matt Selsky at 2017-04-29T10:03:37-04:00
Add ntpq's ":config" -> "config" to the list of incompatible changes

- - - - -


5 changed files:

- attic/calc_tickadj/calc_tickadj
- contrib/make-leap-seconds.py
- docs/includes/assoc-commands.txt
- docs/includes/ntpq-body.txt
- docs/ntpsec.txt


Changes:

=====================================
attic/calc_tickadj/calc_tickadj
=====================================
--- a/attic/calc_tickadj/calc_tickadj
+++ b/attic/calc_tickadj/calc_tickadj
@@ -19,7 +19,7 @@ USAGE: calc_tickadj [-t tick] [-d drift-file]
 Options are specified by doubled hyphens and their name or by a single
 hyphen and the flag character.
 '''
-#SPDX-License-Identifier: BSD-2-Clause
+# SPDX-License-Identifier: BSD-2-Clause
 
 from __future__ import print_function, division
 
@@ -61,7 +61,7 @@ if __name__ == '__main__':
         sys.exit(1)
 
     # Drift file is in PPM where Million is actually 2**20
-    cvt   = (2 ** 20) / tick
+    cvt = (2 ** 20) / tick
     drift = 0.0
 
     try:


=====================================
contrib/make-leap-seconds.py
=====================================
--- a/contrib/make-leap-seconds.py
+++ b/contrib/make-leap-seconds.py
@@ -12,7 +12,10 @@ Defaults are start of tomorrow (UTC), and 28 days after the leap.
 # SPDX-License-Identifier: BSD-2-Clause
 from __future__ import print_function, division
 
-import sha, sys, time, datetime
+import datetime
+import sha
+import sys
+import time
 
 master_encoding = 'latin-1'
 
@@ -86,21 +89,21 @@ days = int(leap/86400)
 leap = (days+1)*86400
 
 if len(args) > 0:
-  leapdate = datetime.datetime.strptime(args[0], "%Y-%m-%d")
-  leap = (leapdate - epoch).total_seconds()
-  leap = int(leap)
-  args = args[1:]
+    leapdate = datetime.datetime.strptime(args[0], "%Y-%m-%d")
+    leap = (leapdate - epoch).total_seconds()
+    leap = int(leap)
+    args = args[1:]
 
 expire = leap + 28*86400
 if len(args) > 0:
-  expiredate = datetime.datetime.strptime(args[0], "%Y-%m-%d")
-  expire = (expiredate - epoch).total_seconds()
-  expire = int(expire)
-  args = args[1:]
+    expiredate = datetime.datetime.strptime(args[0], "%Y-%m-%d")
+    expire = (expiredate - epoch).total_seconds()
+    expire = int(expire)
+    args = args[1:]
 leap_txt = time.asctime(time.gmtime(leap))
 leap = str(leap+JAN_1970)
 expire_txt = time.asctime(time.gmtime(expire))
-expire=str(expire+JAN_1970)
+expire = str(expire+JAN_1970)
 
 update = int(time.time())
 update_txt = time.asctime(time.gmtime(update))
@@ -132,7 +135,7 @@ sha1.update(expire)
 print("#$ %s  # %s" % (update, update_txt))
 sha1.update(update)
 digest = sha1.hexdigest()
-print("#h %s %s %s %s %s" % \
- (digest[0:8], digest[8:16], digest[16:24], digest[24:32], digest[32:40]))
+print("#h %s %s %s %s %s" %
+      (digest[0:8], digest[8:16], digest[16:24], digest[24:32], digest[32:40]))
 
 # end


=====================================
docs/includes/assoc-commands.txt
=====================================
--- a/docs/includes/assoc-commands.txt
+++ b/docs/includes/assoc-commands.txt
@@ -58,7 +58,7 @@ at the _address_ specified, which is usually the broadcast address on
   This command removes a previously configured association. An address
   or association ID can be used to identify the association. Either an
   IP address or DNS name can be used. This command is most useful when
-  supplied via +ntpq+ runtime configuration commands +:config+ and
+  supplied via +ntpq+ runtime configuration commands +config+ and
   +config-from-file+.
 
 // end


=====================================
docs/includes/ntpq-body.txt
=====================================
--- a/docs/includes/ntpq-body.txt
+++ b/docs/includes/ntpq-body.txt
@@ -383,7 +383,7 @@ displayed.
 == Authentication ==
 
 Four commands require authentication to the server: config-from-file,
-:config, ifstats, and reslist.  An authkey file must be in place and
+config, ifstats, and reslist.  An authkey file must be in place and
 a control key declared in ntp.conf for these commands to work.
 
 If you are running as root or otherwise have read access to the


=====================================
docs/ntpsec.txt
=====================================
--- a/docs/ntpsec.txt
+++ b/docs/ntpsec.txt
@@ -89,6 +89,8 @@ a build-time switch, not a run-time one).
 * The ttl-hop option for broadcast mode has been removed from the
   configuration grammar.  It was never actually implemented.
 
+* ntpq's ":config" command is now "config".
+
 [[security]]
 == Security Improvements ==
 



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/e2785098eed02420d084b2b87b70ea003c484f6a...7c1cb7ed6e53b57aaffdfe7b5ca51312f7f7aecb

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/e2785098eed02420d084b2b87b70ea003c484f6a...7c1cb7ed6e53b57aaffdfe7b5ca51312f7f7aecb
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/20170429/8fa93977/attachment.html>


More information about the vc mailing list