diff options
Diffstat (limited to 'mastodon')
-rw-r--r-- | mastodon/Mastodon.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index efbe89d..08821b8 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -101,8 +101,8 @@ class Mastodon: | |||
101 | except: | 101 | except: |
102 | raise ValueError('Invalid user name, password or scopes.') | 102 | raise ValueError('Invalid user name, password or scopes.') |
103 | 103 | ||
104 | requested_scopes = " ".join(scopes) | 104 | requested_scopes = " ".join(sorted(scopes)) |
105 | received_scopes = " ".join(sorted(response["scopes"].split(" "))) | 105 | received_scopes = " ".join(sorted(response["scope"].split(" "))) |
106 | 106 | ||
107 | if requested_scopes != received_scopes: | 107 | if requested_scopes != received_scopes: |
108 | raise ValueError('Granted scopes "' + received_scopes + '" differ from requested scopes "' + requested_scopes + '".') | 108 | raise ValueError('Granted scopes "' + received_scopes + '" differ from requested scopes "' + requested_scopes + '".') |