IrcClient.py:connect(): create file from socket w/ errors="replace" to prevent UnicodeDecodeErrors.

This commit is contained in:
Lucio Andrés Illanes Albornoz 2018-01-22 21:06:46 +01:00
parent b385909b45
commit f77e6d5bf8
1 changed files with 1 additions and 1 deletions

View File

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