Fix crash in NadMixer when using unicode strings for settings

This commit is contained in:
Stein Magnus Jodal 2011-01-15 14:00:35 +01:00
parent 4eb694c84b
commit e7ed28d0d4
2 changed files with 7 additions and 0 deletions

View File

@ -71,6 +71,11 @@ No description yet.
any help from the original MPD server.
- Support UTF-8 encoded tag caches with non-ASCII characters.
- Mixers:
- Support use of unicode strings for :mod:`mopidy.mixers.nad` specific
settings.
- Models:
- Rename and generalize ``Playlist._with(**kwargs)`` to

View File

@ -147,6 +147,8 @@ class NadTalker(BaseThread):
return self._readline().replace('%s=' % key, '')
def _command_device(self, key, value):
if type(value) == unicode:
value = value.encode('utf-8')
self._write('%s=%s' % (key, value))
self._readline()