Python3: traceback with ntpq reslist
$ python3 ./ntpclients/ntpq
ntpq> reslist
Keyid: 99999
MD5 Password:
Traceback (most recent call last):
File "./ntpclients/ntpq", line 1663, in <module>
interpreter.cmdloop()
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/cmd.py", line 138, in cmdloop
stop = self.onecmd(line)
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/cmd.py", line 217, in onecmd
return func(arg)
File "./ntpclients/ntpq", line 1376, in do_reslist
entries = self.session.reslist()
File "/usr/local/lib/python3.5/site-packages/ntp/packet.py", line 1409, in reslist
return self.__ordlist("addr_restrictions")
File "/usr/local/lib/python3.5/site-packages/ntp/packet.py", line 1395, in __ordlist
self.doquery(opcode=ntp.control.CTL_OP_READ_ORDLIST_A, qdata=listtype, auth=True)
File "/usr/local/lib/python3.5/site-packages/ntp/packet.py", line 1091, in doquery
self.sendrequest(opcode, associd, qdata, auth)
File "/usr/local/lib/python3.5/site-packages/ntp/packet.py", line 893, in sendrequest
self.keyid, self.keytype, self.passwd)
File "/usr/local/lib/python3.5/site-packages/ntp/packet.py", line 1455, in compute_mac
hasher.update(passwd)
TypeError: Unicode-objects must be encoded before hashing