'ntpq -c ":config"' does not work (it probably never did)
Eric S. Raymond
esr at thyrsus.com
Thu Sep 12 04:13:19 UTC 2019
Matthew Selsky via devel <devel at ntpsec.org>:
> On Mon, Sep 09, 2019 at 08:46:26AM -0700, James Browning via devel wrote:
> > While working on a script, I stumbled across this issue. the cmd.Cmd
> > class does not call its precmd function from its onecmd function in
> > either Python 2.7 or 3.6. I see several possible paths forward.
> >
> > 1. Ignore the issue and hope it goes away.
> > 2. Report it upstream.
> > 3. Change over to hot_config option exclusively.
> > 4. Add a wrapper to onecmd that fixes things.
> > 5. More extensive fixes to cmd.Cmd.
> > 6. Change to a new command-line interpreter.
> > 7. Another path I am not even considering.
> >
> > I would advocate for the wrapper or changing to hot_config as the least
> > not good options at this time. Ignoring it stacks up technical debt for
> > later. Upstream would probably say it works as intended. Changing to a
> > new interpreter would throw away all the good work on this one. More
> > extensive work is possible but probably beyond my capabilities.
>
> Yes, please talk to upstream and see what they recommend. And this change
> should be documented in our incompatible changes list until we have a
> compatible function (or we decide to leave the feature out)
Or there's the simplest possible fix, which I just pushed. The expression used
to process the argument of -c just changed from
interpreter.onecmd(command)
to
interpreter.onecmd(interpreter.precmd(command))
Thanks for catching this. If anything goes sproing, bug me.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
More information about the devel
mailing list