mirror of
https://github.com/c0de-archive/spotipy.git
synced 2024-11-14 02:57:27 +00:00
Merge pull request #179 from richardmitic/token-scope-check
Token cache handles null scopes correctly
This commit is contained in:
commit
133f66ccd9
@ -153,11 +153,8 @@ class SpotifyOAuth(object):
|
||||
pass
|
||||
|
||||
def _is_scope_subset(self, needle_scope, haystack_scope):
|
||||
if needle_scope:
|
||||
needle_scope = set(needle_scope.split())
|
||||
if haystack_scope:
|
||||
haystack_scope = set(haystack_scope.split())
|
||||
|
||||
needle_scope = set(needle_scope.split()) if needle_scope else set()
|
||||
haystack_scope = set(haystack_scope.split()) if haystack_scope else set()
|
||||
return needle_scope <= haystack_scope
|
||||
|
||||
def is_token_expired(self, token_info):
|
||||
|
Loading…
Reference in New Issue
Block a user