Fix UnicodeDecodeError in MPD frontend on non-english locale

This commit is contained in:
Antoine Pierlot-Garcin 2011-04-29 20:46:34 -04:00 committed by Thomas Adamcik
parent cec3c30400
commit 5830ab3377

View File

@ -52,7 +52,7 @@ class MpdServer(asyncore.dispatcher):
self._format_hostname(settings.MPD_SERVER_HOSTNAME),
settings.MPD_SERVER_PORT)
except IOError, e:
logger.error('MPD server startup failed: %s' % e)
logger.error(u'MPD server startup failed: %s' % str(e).decode('utf-8'))
sys.exit(1)
def handle_accept(self):