diff --git a/exercises/11-Packet-Loss-Detection/packet-loss-controller.py b/exercises/11-Packet-Loss-Detection/packet-loss-controller.py index fe42174..e3396c6 100644 --- a/exercises/11-Packet-Loss-Detection/packet-loss-controller.py +++ b/exercises/11-Packet-Loss-Detection/packet-loss-controller.py @@ -145,7 +145,7 @@ def recv_msg_cpu(self, pkt): switch_name = interface.split("-")[0] packet = Ether(str(pkt)) if packet.type == 0x1234: - loss_header = LossHeader(packet.payload) + loss_header = LossHeader(bytes(packet.payload)) batch_id = loss_header.batch_id >> 7 print switch_name, batch_id diff --git a/exercises/11-Packet-Loss-Detection/solution/packet-loss-controller.py b/exercises/11-Packet-Loss-Detection/solution/packet-loss-controller.py index ad79f39..179f197 100644 --- a/exercises/11-Packet-Loss-Detection/solution/packet-loss-controller.py +++ b/exercises/11-Packet-Loss-Detection/solution/packet-loss-controller.py @@ -225,7 +225,7 @@ def recv_msg_cpu(self, pkt): switch_name = interface.split("-")[0] packet = Ether(str(pkt)) if packet.type == 0x1234: - loss_header = LossHeader(packet.payload) + loss_header = LossHeader(bytes(packet.payload)) batch_id = loss_header.batch_id >> 7 print switch_name, batch_id self.check_sw_links(switch_name, batch_id)