[Git][NTPsec/ntpsec][master] Address Gitlab issue #177: ntpq > TypeError in packet.py

Eric S. Raymond gitlab at mg.gitlab.com
Thu Dec 1 23:31:03 UTC 2016


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


Commits:
028c2507 by Eric S. Raymond at 2016-12-01T18:29:10-05:00
Address Gitlab issue #177: ntpq > TypeError in packet.py

- - - - -


1 changed file:

- pylib/packet.py


Changes:

=====================================
pylib/packet.py
=====================================
--- a/pylib/packet.py
+++ b/pylib/packet.py
@@ -373,7 +373,7 @@ class SyncPacket(Packet):
         self.origin_timestamp = 0
         self.receive_timestamp = 0
         self.transmit_timestamp = 0
-        self.data = data
+        self.data = polybyes(data)
         self.extension = ''
         self.extfields = []
         self.mac = ''
@@ -567,6 +567,7 @@ class ControlPacket(Packet):
         return "%5d %5d\t%3d octets\n" % (self.offset, self.end(), self.count)
 
     def analyze(self, rawdata):
+        rawdata = polybytes(rawdata)        
         (self.li_vn_mode,
          self.r_e_m_op,
          self.sequence,



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/028c2507b91053afb7f5c4465065ce190bd39134
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161201/a27b0025/attachment.html>


More information about the vc mailing list