TRACE log when we have to use fallback encoding
This commit is contained in:
parent
69f9aab4b9
commit
a4bfae9557
1 changed files with 4 additions and 2 deletions
|
@ -240,10 +240,12 @@ class Server(IRCObject.Object):
|
|||
decoded_lines = []
|
||||
|
||||
for line in data_lines:
|
||||
encoding = self.get_setting("encoding", "utf8")
|
||||
try:
|
||||
line = line.decode(self.get_setting(
|
||||
"encoding", "utf8"))
|
||||
line = line.decode(encoding)
|
||||
except:
|
||||
self.bot.log.trace("Cannot decode line with '%s', falling back",
|
||||
[encoding])
|
||||
try:
|
||||
line = line.decode(self.get_setting(
|
||||
"fallback-encoding", "latin-1"))
|
||||
|
|
Loading…
Reference in a new issue