From 2dd665dd9ea8ec27dc175f979f50cd972f9a89af Mon Sep 17 00:00:00 2001 From: enkore Date: Mon, 13 May 2019 11:53:38 +0200 Subject: [PATCH] mpd: use "replace" error handler for decoding UTF-8 from daemon --- i3pystatus/mpd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i3pystatus/mpd.py b/i3pystatus/mpd.py index 2ade8a5..2632eef 100644 --- a/i3pystatus/mpd.py +++ b/i3pystatus/mpd.py @@ -120,7 +120,7 @@ cleartext to the server.)"), sock.recv(8192) sock.send((command + "\n").encode("utf-8")) try: - reply = sock.recv(16384).decode("utf-8") + reply = sock.recv(16384).decode("utf-8", "replace") replylines = reply.split("\n")[:-2] return dict(