[Git][NTPsec/ntpsec][master] 3 commits: pyntpq: convert tab to spaces
Gary E. Miller
gitlab at mg.gitlab.com
Thu Sep 22 20:50:21 UTC 2016
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
c252a097 by Matt Selsky at 2016-09-22T13:49:37-07:00
pyntpq: convert tab to spaces
Signed-off-by: Gary E. Miller <gem at rellim.com>
- - - - -
d57c8e70 by Matt Selsky at 2016-09-22T13:49:37-07:00
pyntpq: Don't rerun commands on empty input lines
Define emptyline() function to avoid the default behavior of Cmd module
Signed-off-by: Gary E. Miller <gem at rellim.com>
- - - - -
4f4bbec6 by Matt Selsky at 2016-09-22T13:49:38-07:00
Mimic ntpq "help help" output
Signed-off-by: Gary E. Miller <gem at rellim.com>
- - - - -
1 changed file:
- ntpq/pyntpq
Changes:
=====================================
ntpq/pyntpq
=====================================
--- a/ntpq/pyntpq
+++ b/ntpq/pyntpq
@@ -193,11 +193,22 @@ class ntpq_interpreter(cmd.Cmd):
#self.auth_hashlen = 16 # MD5
self.rawmode = False # Flag which indicates raw mode output.
self.showhostnames = True # If false, display numeric IPs
- #self.l_fp delay_time # delay time
+ #self.l_fp delay_time # delay time
self.wideremote = False # show wide remote names?
self.ccmds = [] # Queued commands
self.chosts = [] # Command-line hosts
self.debug = 0
+
+ def emptyline(self):
+ "Called when an empty line is entered in response to the prompt."
+ pass
+
+ def help_help(self):
+ sys.stdout.write("""\
+function: tell the use and syntax of commands
+usage: help [ command ]
+""")
+
def do_EOF(self, _unused):
"exit ntpq"
sys.stdout.write("\n")
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/c5d48b7d969fc21eed67ce643555b094597c9cfa...4f4bbec636cc5a2aa898bbfaccd7a2272605308f
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160922/0fe7c780/attachment.html>
More information about the vc
mailing list