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 0724c80868
commit 7192b66805

View File

@ -52,7 +52,7 @@ class IrcClient:
self.close(); return False; self.close(); return False;
else: else:
select.select([], [self.clientSocket.fileno()], []) 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.clientQueue = []
self.queue("NICK", self.clientNick) self.queue("NICK", self.clientNick)
self.queue("USER", self.clientIdent, "0", "0", self.clientGecos) self.queue("USER", self.clientIdent, "0", "0", self.clientGecos)