Remove encoding of unicode objects from mopidy.config
This commit is contained in:
parent
be647625b1
commit
7fde4ef054
@ -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()
|
||||
|
||||
@ -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):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user