Remove encoding of unicode objects from mopidy.config

This commit is contained in:
Stein Magnus Jodal 2010-02-23 00:08:14 +01:00
parent be647625b1
commit 7fde4ef054
2 changed files with 2 additions and 3 deletions

View File

@ -14,8 +14,6 @@ class Config(object):
value = getattr(settings, attr)
if type(value) != bool and not value:
raise ConfigError(u'Setting "%s" is empty.' % attr)
if type(value) == unicode:
value = value.encode('utf-8')
return value
config = Config()

View File

@ -27,7 +27,8 @@ class DespotifyBackend(BaseBackend):
def _connect(self):
logger.info(u'Connecting to Spotify')
return spytify.Spytify(
config.SPOTIFY_USERNAME, config.SPOTIFY_PASSWORD)
config.SPOTIFY_USERNAME.encode(ENCODING),
config.SPOTIFY_PASSWORD.encode(ENCODING))
class DespotifyCurrentPlaylistController(BaseCurrentPlaylistController):