diff --git a/src/IRCSocket.py b/src/IRCSocket.py index d62f16c8..3e805908 100644 --- a/src/IRCSocket.py +++ b/src/IRCSocket.py @@ -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)