Skip to content

Commit

Permalink
Merge pull request #9 from mtsanovv/dev
Browse files Browse the repository at this point in the history
Fix configuration error when connecting to Spotify for the first time
  • Loading branch information
mtsanovv committed Aug 22, 2022
2 parents cba1d70 + 64ba137 commit 54db2bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/youspotube/api/spotify.py
Expand Up @@ -19,7 +19,7 @@ def connection(self):
# _init_connection should have been called in order to be able to use this property
auth_manager = self.spotify.auth_manager
token_info = auth_manager.cache_handler.get_cached_token()
if auth_manager.is_token_expired(token_info):
if token_info is not None and auth_manager.is_token_expired(token_info):
self._init_connection()
return self.spotify

Expand Down

0 comments on commit 54db2bf

Please sign in to comment.