From b07eddb9ea3d35a8400261e96ca38ff2622bbcc1 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Sun, 5 May 2019 15:26:10 +0000 Subject: [PATCH] Fix selftest telopt callback for Python 3.4 Python 3.4 is unable to handle formatted bytestrings. Replace two occurrences in the Telnet option callback handler in the selftest script to use concatenation operators instead. --- mudpy/tests/selftest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mudpy/tests/selftest.py b/mudpy/tests/selftest.py index 3b00b48..202778a 100644 --- a/mudpy/tests/selftest.py +++ b/mudpy/tests/selftest.py @@ -432,9 +432,9 @@ def option_callback(telnet_socket, command, option): # any response to avoid endlessly looping pass elif command in (telnetlib.DO, telnetlib.DONT): - telnet_socket.send(b"%s%s%s" % (telnetlib.IAC, telnetlib.WONT, option)) + telnet_socket.send(telnetlib.IAC + telnetlib.WONT + option) elif command in (telnetlib.WILL, telnetlib.WONT): - telnet_socket.send(b"%s%s%s" % (telnetlib.IAC, telnetlib.DONT, option)) + telnet_socket.send(telnetlib.IAC + telnetlib.DONT + option) def main(): -- 2.11.0