[Git][NTPsec/ntpsec][master] removed unneeded panens, make some indents standard (4 spaces).

Gary E. Miller gitlab at mg.gitlab.com
Mon Aug 7 22:02:54 UTC 2017


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
0b1aa8c4 by Gary E. Miller at 2017-08-07T15:02:09-07:00
removed unneeded panens, make some indents standard (4 spaces).

- - - - -


1 changed file:

- pylib/util.py


Changes:

=====================================
pylib/util.py
=====================================
--- a/pylib/util.py
+++ b/pylib/util.py
@@ -147,7 +147,7 @@ def oomsbetweenunits(a, b):
     "Calculates how many orders of magnitude separate two units"
     group = getunitgroup(a)
     if b is None:  # asking for baseunit
-        return (group.index(a) * 3)
+        return group.index(a) * 3
     elif b in group:
         ia = group.index(a)
         ib = group.index(b)
@@ -490,11 +490,11 @@ class PeerStatusWord:
         else:
             self.conf = "no"
         if statval & ntp.control.CTL_PST_BCAST:
-                self.reach = "none"
-                if statval & ntp.control.CTL_PST_AUTHENABLE:
-                        self.auth = "yes"
-                else:
-                        self.auth = "none"
+            self.reach = "none"
+            if statval & ntp.control.CTL_PST_AUTHENABLE:
+                    self.auth = "yes"
+            else:
+                    self.auth = "none"
         elif statval & ntp.control.CTL_PST_REACH:
             self.reach = "yes"
         else:
@@ -886,8 +886,8 @@ class PeerSummary:
                 % (variables.get("stratum", 0)[0],
                    ptype,
                    PeerSummary.prettyinterval(
-                    now if last_sync is None
-                    else int(now - ntp.ntpc.lfptofloat(last_sync))),
+                       now if last_sync is None
+                       else int(now - ntp.ntpc.lfptofloat(last_sync))),
                    PeerSummary.prettyinterval(poll_sec), reach))
             if saw6:
                 if self.showunits:



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/0b1aa8c4e4b28e9f48de68cc3522579afbb82036

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/0b1aa8c4e4b28e9f48de68cc3522579afbb82036
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/20170807/413f080f/attachment.html>


More information about the vc mailing list