From 652e68d3be1f6f7b97d715deef99a258f249595b Mon Sep 17 00:00:00 2001 From: Kaliko Jack Date: Mon, 15 Apr 2013 20:17:07 +0200 Subject: [PATCH] Explicit R/W utf-8 encoded bytes to socket python-mpd now deals only with unicode --- mpd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mpd.py b/mpd.py index 373bd16..b504428 100644 --- a/mpd.py +++ b/mpd.py @@ -426,8 +426,8 @@ class MPDClient(object): self._sock = self._connect_unix(host) else: self._sock = self._connect_tcp(host, port) - self._rfile = self._sock.makefile("r") - self._wfile = self._sock.makefile("w") + self._rfile = self._sock.makefile("r", encoding='utf-8') + self._wfile = self._sock.makefile("w", encoding='utf-8') try: self._hello() except: -- 2.39.5