Skip to content

Commit

Permalink
Set default expiration time for the Spotify access token
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlecat committed Aug 12, 2017
1 parent 36111c8 commit e93310e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion critiquebrainz/frontend/external/spotify.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def _fetch_access_token() -> str:
if not access_token:
raise SpotifyException("Could not fetch access token for Spotify API")
# Making the token stored in cache expire at the same time as the actual token
cache.set(key=key, val=access_token, time=resp.get("expires_in"))
cache.set(key=key, val=access_token, time=resp.get("expires_in", 10))
return access_token


Expand Down

0 comments on commit e93310e

Please sign in to comment.