Python ntpq

Achim Gratz Stromeko at nexgo.de
Sun Nov 27 12:34:21 UTC 2016


Eric S. Raymond writes:
> Achim Gratz <Stromeko at nexgo.de>:
>> Current master is mysteriously broken:
>
> Fix pushed.  Though I don't undetstand what odd corner case in the
> import rules we tripped over.

That now doesn't work like this:

pi at raspberrypi2:~/ntpsec $ ntpq/ntpq -c "cv &1" -c "cv &2"
No such index.
No such index.
pi at raspberrypi2:~/ntpsec $ ntpq/ntpq -pc "cv &1" -c "cv &2"
     remote                                   refid      st t when poll reach   delay   offset  jitter
==============================================================================================================================================================================
 NMEA(0)                                 .uBx8.           0 l    2   16  377    0.000   -1.405   1.327
oNMEA(1)                                 .NavS.           0 l    1   16  377    0.000    0.003   0.004
 ptbtime1.ptb.de                         .PTB.            1 u   15   64  377   27.486    0.728   0.097
 ptbtime2.ptb.de                         .PTB.            1 u   23   64  377   27.193    0.764   0.129
 ptbtime3.ptb.de                         .PTB.            1 u   67   64  376   25.892   -0.101   0.132
Traceback (most recent call last):
  File "ntpq/ntpq", line 1590, in <module>
    interpreter.onecmd(cmd)
  File "/usr/lib/python2.7/cmd.py", line 221, in onecmd
    return func(arg)
  File "ntpq/ntpq", line 1082, in do_cv
    self.do_clockvar(line)
  File "ntpq/ntpq", line 1072, in do_clockvar
    self.__dolist(line.split()[1:], assoc, ntp.packet.CTL_OP_READCLOCK, ntp.ntpc.TYPE_CLOCK)
  File "ntpq/ntpq", line 456, in __dolist
    variables = self.session.readvar(associd, varlist, op)
  File "/usr/lib/python2.7/dist-packages/ntp/packet.py", line 1148, in readvar
    return self.__parse_varlist()
  File "/usr/lib/python2.7/dist-packages/ntp/packet.py", line 1119, in __parse_varlist
    response[i] = "\xae"
TypeError: 'str' object does not support item assignment


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables



More information about the devel mailing list