[Git][NTPsec/ntpsec][master] Haren ntpq a bit. Make stdversion() a bit more informative.

Eric S. Raymond gitlab at mg.gitlab.com
Sat Nov 12 12:34:51 UTC 2016


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


Commits:
5f72ee5b by Eric S. Raymond at 2016-11-12T07:34:06-05:00
Haren ntpq a bit.  Make stdversion() a bit more informative.

- - - - -


1 changed file:

- pylib/util.py


Changes:

=====================================
pylib/util.py
=====================================
--- a/pylib/util.py
+++ b/pylib/util.py
@@ -14,7 +14,7 @@ from ntp.packet import *
 from ntp.version import *
 
 def stdversion():
-    return "%s %s+%s" % (BASENAME, VERSION, ntp.version.TICK)
+    return "%s %s+%s %s" % (BASENAME, VERSION, TICK, DATE)
 
 def portsplit(hostname):
     portsuffix = ""
@@ -59,7 +59,7 @@ def termsize():
     import shlex, subprocess, re
     try:
         output = subprocess.check_output(shlex.split('/bin/stty -a'))
-    except OSError:
+    except (OSError, subprocess.CalledProcessError, AttributeError):
         return (24, 80)
     for pattern in ('rows\D+(\d+); columns\D+(\d+);', '\s+(\d+)\D+rows;\s+(\d+)\D+columns;'):
         m = re.search(pattern, output)



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/5f72ee5bedc2834fe2c0220770d6d5df61e59e0a
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161112/a267ef01/attachment.html>


More information about the vc mailing list