From 23775dfe1add8f00d4095ab71687a0394f9b286f Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Sun, 17 Jul 2011 23:44:00 +0200 Subject: [PATCH] Fix up last comments regarding typo and more logging --- mopidy/utils/network.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mopidy/utils/network.py b/mopidy/utils/network.py index 852b6ca6..b7f808c9 100644 --- a/mopidy/utils/network.py +++ b/mopidy/utils/network.py @@ -320,7 +320,7 @@ class LineProtocol(ThreadingActor): def on_stop(self): """Ensure that cleanup when actor stops.""" - self.connection.stop(u'Actor is shuting down.') + self.connection.stop(u'Actor is shutting down.') def parse_lines(self): """Consume new data and yield any lines found.""" @@ -337,7 +337,9 @@ class LineProtocol(ThreadingActor): """ try: return line.encode(self.encoding) - except UnicodeError: # FIXME log this? + except UnicodeError: + logger.warning(u'Stoping actor due to encode problem, data ' + 'supplied by client was not valid %s', self.encoding) self.stop() def decode(self, line): @@ -348,7 +350,9 @@ class LineProtocol(ThreadingActor): """ try: return line.decode(self.encoding) - except UnicodeError: # FIXME log this? + except UnicodeError: + logger.warning(u'Stoping actor due to decode problem, data ' + 'supplied by client was not valid %s', self.encoding) self.stop() def join_lines(self, lines):