From 8a440fff3f0abbb778ae4bc8ba064f6a8247c9d4 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Wed, 14 Nov 2012 18:12:44 +0100 Subject: [PATCH] network: Server send buffer should be bytes, not unicode (#241) --- mopidy/utils/network.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mopidy/utils/network.py b/mopidy/utils/network.py index 91831871..3ddfe2ee 100644 --- a/mopidy/utils/network.py +++ b/mopidy/utils/network.py @@ -140,7 +140,7 @@ class Connection(object): self.timeout = timeout self.send_lock = threading.Lock() - self.send_buffer = '' + self.send_buffer = b'' self.stopping = False @@ -193,7 +193,7 @@ class Connection(object): if e.errno in (errno.EWOULDBLOCK, errno.EINTR): return data self.stop('Unexpected client error: %s' % e) - return '' + return b'' def enable_timeout(self): """Reactivate timeout mechanism."""