Specifically only catch UnicodeDecodeError in IRCSocket.read
This commit is contained in:
parent
1dad4827b6
commit
c842c459f4
1 changed files with 2 additions and 2 deletions
|
@ -105,12 +105,12 @@ class Socket(IRCObject.Object):
|
|||
for line in data_lines:
|
||||
try:
|
||||
decoded_line = line.decode(self._encoding)
|
||||
except:
|
||||
except UnicodeDecodeError:
|
||||
self.log.trace("can't decode line with '%s', falling back",
|
||||
[self._encoding])
|
||||
try:
|
||||
decoded_line = line.decode(self._fallback_encoding)
|
||||
except:
|
||||
except UnicodeDecodeError:
|
||||
continue
|
||||
decoded_lines.append(decoded_line)
|
||||
|
||||
|
|
Loading…
Reference in a new issue