diff --git a/stream/ws_client.py b/stream/ws_client.py index 1cc56cdd..ac7dd281 100644 --- a/stream/ws_client.py +++ b/stream/ws_client.py @@ -111,7 +111,7 @@ def readline_channel(self, channel, timeout=None): def write_channel(self, channel, data): """Write data to a channel.""" - self.sock.send(chr(channel) + data) + self.sock.send(bytearray((channel,)) + data) def peek_stdout(self, timeout=0): """Same as peek_channel with channel=1."""