[Git][NTPsec/ntpsec][master] issue #500 shorten status line
James Browning
gitlab at mg.gitlab.com
Tue Oct 2 03:29:10 UTC 2018
James Browning pushed to branch master at NTPsec / ntpsec
Commits:
9ea65432 by James Browning at 2018-10-02T03:25:16Z
issue #500 shorten status line
- - - - -
1 changed file:
- ntpclients/ntpmon.py
Changes:
=====================================
ntpclients/ntpmon.py
=====================================
@@ -28,6 +28,7 @@ Any keystroke causes a poll and update. Keystroke commands:
from __future__ import print_function, division
import getopt
+import re
import sys
import time
@@ -76,9 +77,10 @@ def statline(_peerlist, _mrulist, nyquist):
"Generate a status line"
# We don't use stdversion here because the presence of a date is confusing
leader = sysvars['version'][0]
+ leader = re.sub(r" \([^\)]*\)" , "", leader)
if span.entries:
trailer = "Updated: %s (%s)" \
- % (iso8601(span.entries[0].last),
+ % (iso8601(span.entries[0].last).split("T")[1],
ntp.util.PeerSummary.prettyinterval(nyquist))
else:
trailer = ""
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/9ea65432af1e55c0285b648f2832101cc6b78d97
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/9ea65432af1e55c0285b648f2832101cc6b78d97
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/20181002/410ec56f/attachment.html>
More information about the vc
mailing list