[Git][NTPsec/ntpsec][master] ntpmon: make MRUSummary() dynamic on terminal width, not hard 79.

Gary E. Miller gitlab at mg.gitlab.com
Thu Aug 10 18:20:52 UTC 2017


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


Commits:
0cb8e121 by Gary E. Miller at 2017-08-10T11:19:37-07:00
ntpmon: make MRUSummary() dynamic on terminal width, not hard 79.

- - - - -


1 changed file:

- pylib/util.py


Changes:

=====================================
pylib/util.py
=====================================
--- a/pylib/util.py
+++ b/pylib/util.py
@@ -1054,9 +1054,9 @@ class MRUSummary:
 
     header = " lstint avgint rstr r m v  count rport remote address"
 
-    width = 79
 
     def summary(self, entry):
+        width = ntp.util.termsize().width - 1
         last = ntp.ntpc.lfptofloat(entry.last)
         if self.now:
             lstint = int(self.now - last + 0.5)



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

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/0cb8e121331c5035100ee7fa8e7953f98c7fc666
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/20170810/e4b79210/attachment.html>


More information about the vc mailing list