mpd: use "replace" error handler for decoding UTF-8 from daemon

This commit is contained in:
enkore 2019-05-13 11:53:38 +02:00 committed by GitHub
parent 80a0583466
commit 2dd665dd9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(