From 7192b66805658b1802f9efce559f193a926a4863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Mon, 22 Jan 2018 21:06:46 +0100 Subject: [PATCH] IrcClient.py:connect(): create file from socket w/ errors="replace" to prevent UnicodeDecodeErrors. --- IrcClient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IrcClient.py b/IrcClient.py index 1d8647a..4891027 100644 --- a/IrcClient.py +++ b/IrcClient.py @@ -52,7 +52,7 @@ class IrcClient: self.close(); return False; else: select.select([], [self.clientSocket.fileno()], []) - self.clientSocketFile = self.clientSocket.makefile(encoding="utf-8") + self.clientSocketFile = self.clientSocket.makefile(encoding="utf-8", errors="replace") self.clientQueue = [] self.queue("NICK", self.clientNick) self.queue("USER", self.clientIdent, "0", "0", self.clientGecos)