Skip to content

Commit

Permalink
Fixes error when scope is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
josduj committed Jan 18, 2017
1 parent f638b0c commit 4f15a6f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spotipy/oauth2.py
Expand Up @@ -149,8 +149,10 @@ def _save_token_info(self, token_info):
pass

def _is_scope_subset(self, needle_scope, haystack_scope):
needle_scope = set(needle_scope.split())
haystack_scope = set(haystack_scope.split())
if needle_scope:
needle_scope = set(needle_scope.split())
if haystack_scope:
haystack_scope = set(haystack_scope.split())

return needle_scope <= haystack_scope

Expand Down

0 comments on commit 4f15a6f

Please sign in to comment.