]> kaliko git repositories - python-musicpd.git/commitdiff
Explicit R/W utf-8 encoded bytes to socket
authorKaliko Jack <kaliko@azylum.org>
Mon, 15 Apr 2013 18:17:07 +0000 (20:17 +0200)
committerKaliko Jack <kaliko@azylum.org>
Mon, 15 Apr 2013 18:17:07 +0000 (20:17 +0200)
python-mpd now deals only with unicode

mpd.py

diff --git a/mpd.py b/mpd.py
index 373bd1672d835d6a0ecad229856d55cc3168d4f7..b50442829cd05ebe94be831e2b4caacabcd5b36a 100644 (file)
--- 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: