diff --git a/mopidy/__init__.py b/mopidy/__init__.py index 0c54ab33..2def5cfe 100644 --- a/mopidy/__init__.py +++ b/mopidy/__init__.py @@ -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() diff --git a/mopidy/backends/despotify.py b/mopidy/backends/despotify.py index dc786d64..062d492e 100644 --- a/mopidy/backends/despotify.py +++ b/mopidy/backends/despotify.py @@ -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):