Skip to content

Commit

Permalink
Merge pull request #361 from kemitche/space-scopes
Browse files Browse the repository at this point in the history
Fix #360. Interpret scopes as space-separated
  • Loading branch information
bboe committed Jan 22, 2015
2 parents 1262327 + 32ffc78 commit 47a7322
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions praw/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ def get_access_information(self, code):
retval = self._handle_oauth_request(data)
return {'access_token': retval['access_token'],
'refresh_token': retval.get('refresh_token'),
'scope': set(retval['scope'].split(','))}
'scope': set(retval['scope'].split(' '))}

@decorators.require_oauth
def get_authorize_url(self, state, scope='identity', refreshable=False):
Expand Down Expand Up @@ -657,7 +657,7 @@ def refresh_access_information(self, refresh_token):
retval = self._handle_oauth_request(data)
return {'access_token': retval['access_token'],
'refresh_token': refresh_token,
'scope': set(retval['scope'].split(','))}
'scope': set(retval['scope'].split(' '))}

def set_oauth_app_info(self, client_id, client_secret, redirect_uri):
"""Set the App information to use with OAuth2.
Expand Down

0 comments on commit 47a7322

Please sign in to comment.