[Git][NTPsec/ntpsec][master] 2 commits: Fix mixed tabs/spaces for Python3

Eric S. Raymond gitlab at mg.gitlab.com
Mon Oct 24 05:17:53 UTC 2016


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


Commits:
dc01a88a by Matt Selsky at 2016-10-24T01:17:31-04:00
Fix mixed tabs/spaces for Python3

TabError: inconsistent use of tabs and spaces in indentation

- - - - -
6c438cda by Matt Selsky at 2016-10-24T01:17:31-04:00
Typo

- - - - -


3 changed files:

- docs/includes/ntpq-body.txt
- ntpq/pyntpq
- ntpsweep/ntpsweep


Changes:

=====================================
docs/includes/ntpq-body.txt
=====================================
--- a/docs/includes/ntpq-body.txt
+++ b/docs/includes/ntpq-body.txt
@@ -122,7 +122,7 @@ following.
   write requests. The command +authenticate yes+ causes +{ntpq}+ to
   send authentication with all requests it makes. Authenticated
   requests causes some servers to handle requests slightly
-  differently. The command +authenticate+ witout arguments causes
+  differently. The command +authenticate+ without arguments causes
   +{ntpq}+ to display whether or not +{ntpq}+ is currently
   authenticating requests.
 


=====================================
ntpq/pyntpq
=====================================
--- a/ntpq/pyntpq
+++ b/ntpq/pyntpq
@@ -235,15 +235,15 @@ usage: help [ command ]
 
         if self.debug:
             sys.stderr.write("\n%d associations total\n" % len(self.peers))
-	#sortassoc()
-	return True
+        #sortassoc()
+        return True
 
     def __printassoc(self, showall):
-	condition = "";
+        condition = "";
         if not self.peers:
             sys.stdout.write("No association IDs in list\n");
             return;
-	sys.stdout.write("\nind assid status  conf reach auth condition  last_event cnt\n");
+        sys.stdout.write("\nind assid status  conf reach auth condition  last_event cnt\n");
         sys.stdout.write("===========================================================\n");
         for (i, peer) in enumerate(self.peers):
             statval = CTL_PEER_STATVAL(peer.status)
@@ -325,13 +325,13 @@ usage: help [ command ]
             return "-"
         if diff <= 2048:
             return str(diff)
-	diff = (diff + 29) / 60
+        diff = (diff + 29) / 60
         if diff <= 300:
             return "%dm" % diff
-	diff = (diff + 29) / 60
+        diff = (diff + 29) / 60
         if diff <= 96:
             return "%dh" % diff
-	diff = (diff + 11) / 24
+        diff = (diff + 11) / 24
         return "%dd" % diff
 
     def __doprintpeers(self, variables, header, associd, af):
@@ -491,19 +491,19 @@ usage: help [ command ]
             sys.stderr.write("***No information returned for association %d\n" \
                              % associd)
             return False;
-	return self.__doprintpeers(variables, header, associd, af);
+        return self.__doprintpeers(variables, header, associd, af);
 
     def __dopeers(self, showall, af, header):
         af = socket.AF_INET6 if "-6" in af else socket.AF_INET
         if not self.__dogetassoc():
             return
         maxhostlen = 0
-	if len(self.chosts) > 1:
+        if len(self.chosts) > 1:
             maxhostlen = max([len(host) for (host, _af) in self.chosts])
             sys.stdout.write("%-*.*s " % \
                              (maxhostlen, maxhostlen, "server"))
-	sys.stdout.write(header)
-	sys.stdout.write(("=" * (maxhostlen + 78)) + "\n")
+        sys.stdout.write(header)
+        sys.stdout.write(("=" * (maxhostlen + 78)) + "\n")
         for peer in self.peers:
             if not showall and \
 		    not (CTL_PEER_STATVAL(peer.status)
@@ -1321,7 +1321,7 @@ usage: sysstats
             ("mru_mem",		"kilobytes:          ", NTP_STR),
             ("mru_maxmem",	"maximum kilobytes:  ", NTP_STR),
         )
-	self.collect_display(associd=0, variables=monstats, decodestatus=False)
+        self.collect_display(associd=0, variables=monstats, decodestatus=False)
 
     def help_monstats(self):
         sys.stdout.write("""\
@@ -1366,7 +1366,7 @@ usage: authinfo
             ("io_wakeups",	"input wakeups:        ", NTP_STR),
             ("io_goodwakeups",	"useful input wakeups: ", NTP_STR),
         )
-	self.collect_display(associd=0, variables=iostats, decodestatus=False)
+        self.collect_display(associd=0, variables=iostats, decodestatus=False)
 
     def help_iostats(self):
         sys.stdout.write("""\


=====================================
ntpsweep/ntpsweep
=====================================
--- a/ntpsweep/ntpsweep
+++ b/ntpsweep/ntpsweep
@@ -47,7 +47,7 @@ def scan_host(host, level):
     if host in known_host_info:
         known_host = True
     else:
-	session = ntp.packet.Mode6session()
+        session = ntp.packet.Mode6session()
         session.openhost(host)
         sysvars = session.readvars()
 



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/00de733510378ec4d96ea89b5351c5d7da9deecd...6c438cdac5edef6ad6d9eb520ea8de33db84d23b
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161024/52a6eb55/attachment.html>


More information about the vc mailing list