From 20514a623656cdca91be28069b8846c2ab177adc Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Wed, 14 Feb 2018 04:45:40 +0000 Subject: [PATCH] avoid errors with python3: the packet data must be in bytes format git-svn-id: https://xpra.org/svn/Xpra/trunk@18430 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/xpra/server/server_core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xpra/server/server_core.py b/src/xpra/server/server_core.py index 04cc44dd0b..0e2890dcac 100644 --- a/src/xpra/server/server_core.py +++ b/src/xpra/server/server_core.py @@ -55,7 +55,7 @@ CHALLENGE_TIMEOUT = envint("XPRA_CHALLENGE_TIMEOUT", 120) -HTTP_UNSUPORTED = """ +HTTP_UNSUPORTED = b""" Error response @@ -745,7 +745,7 @@ def new_conn_err(self, conn, sock, socktype, socket_info, network_protocol, msg= try: sock.settimeout(1) #default to plain text: - packet_data = "disconnect: connection failed, %s?\n" % msg + packet_data = b"disconnect: connection failed, %s?\n" % strtobytes(msg) if network_protocol=="xpra": #try xpra packet format: packet_data = pack_one_packet(["disconnect", "invalid protocol for this port"]) or packet_data