diff options
Diffstat (limited to 'lava_dispatcher/protocols/vland.py')
-rw-r--r-- | lava_dispatcher/protocols/vland.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lava_dispatcher/protocols/vland.py b/lava_dispatcher/protocols/vland.py index b9d53f6c5..f73bb9f91 100644 --- a/lava_dispatcher/protocols/vland.py +++ b/lava_dispatcher/protocols/vland.py @@ -106,11 +106,11 @@ class VlandProtocol(Protocol): msg_len = len(message) try: # send the length as 32bit hexadecimal - ret_bytes = self.sock.send("%08X" % msg_len) + ret_bytes = self.sock.send(b"%08X" % msg_len) if ret_bytes == 0: self.logger.debug("zero bytes sent for length - connection closed?") return False - ret_bytes = self.sock.send(message) + ret_bytes = self.sock.send(message.encode()) if ret_bytes == 0: self.logger.debug("zero bytes sent for message - connection closed?") return False @@ -130,7 +130,7 @@ class VlandProtocol(Protocol): recv_count = 0 response = '' while recv_count < msg_count: - response += self.sock.recv(self.blocks) + response += self.sock.recv(self.blocks).decode() recv_count += self.blocks except socket.error as exc: self.logger.exception("socket error '%d' on response", exc.errno) |