From 0334b03cfe20446e7c275ec4ec29361c16557d7f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 23 Aug 2020 18:30:52 +0530 Subject: [PATCH] py3 compat --- src/calibre/srv/tests/loop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/srv/tests/loop.py b/src/calibre/srv/tests/loop.py index f80cd44cac..57d20e42f6 100644 --- a/src/calibre/srv/tests/loop.py +++ b/src/calibre/srv/tests/loop.py @@ -223,7 +223,7 @@ class LoopTest(BaseTest): self.ae(s.fileno(), 3) os.environ['LISTEN_PID'] = unicode_type(os.getpid()) os.environ['LISTEN_FDS'] = '1' - with TestServer(lambda data:(data.path[0] + data.read()), allow_socket_preallocation=True) as server: + with TestServer(lambda data:(data.path[0].encode('utf-8') + data.read()), allow_socket_preallocation=True) as server: conn = server.connect() conn.request('GET', '/test', 'body') r = conn.getresponse()