[Git][NTPsec/ntpsec][master] pep8 fixes for ntpkeygen

Matt Selsky gitlab at mg.gitlab.com
Wed May 3 05:10:55 UTC 2017


Matt Selsky pushed to branch master at NTPsec / ntpsec


Commits:
7c890d80 by Matt Selsky at 2017-05-03T01:02:56-04:00
pep8 fixes for ntpkeygen

Extra spaces after commas
Misaligned parenthesis
Import print_function from __future__

- - - - -


1 changed file:

- ntpclients/ntpkeygen


Changes:

=====================================
ntpclients/ntpkeygen
=====================================
--- a/ntpclients/ntpkeygen
+++ b/ntpclients/ntpkeygen
@@ -14,6 +14,8 @@
 # MD5 (128-bit) keys used to compute message digests in symmetric
 # key cryptography
 
+from __future__ import print_function
+
 import os
 import sys
 import socket
@@ -40,7 +42,7 @@ def gen_md5(id, groupname):
                     if r != ord('#'):
                         break
                 md5key += chr(r)
-            wp.write("%2d MD5 %s  # MD5 key\n" % (i,  md5key))
+            wp.write("%2d MD5 %s  # MD5 key\n" % (i, md5key))
         for i in range(1, MD5KEYS+1):
             sha1key = ""
             for j in range(MD5SIZE):
@@ -54,9 +56,9 @@ def gen_md5(id, groupname):
 def fheader(file,       # file name id
             ulink,      # linkname
             owner       # owner name
-            ):
+           ):
     try:
-        filename = "ntpkey_%s_%s.%u" % (file,  owner, int(time.time()))
+        filename = "ntpkey_%s_%s.%u" % (file, owner, int(time.time()))
         orig_umask = os.umask(stat.S_IWGRP | stat.S_IRWXO)
         wp = open(filename, "w")
         os.umask(orig_umask)



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/7c890d8038f998d03f3d52aefc7361abed6730d9

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/7c890d8038f998d03f3d52aefc7361abed6730d9
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/20170503/6353fd1e/attachment.html>


More information about the vc mailing list