def decode(self, line):
        try:
            return line.decode(self.encoding)
        except UnicodeError:
            logger.warning(
                'Stopping actor due to decode problem, data '
                'supplied by client was not valid %s',
                self.encoding)
            self.stop()
Handle decoding of line.
dataset/ETHPy150Open mopidy/mopidy/mopidy/internal/network.py/LineProtocol.decode