aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2016-11-24 12:07:41 +0100
committerLorenz Diener <[email protected]>2016-11-24 12:07:41 +0100
commitead7b7fc5ed5fe4cd4eec4475de5e4addfbcef76 (patch)
treeac4739d2c89874d800e248d5c13f540840831079
parent68899a0cc4837f0202e2542f5308e61d079e7a2e (diff)
downloadmastodon.py-ead7b7fc5ed5fe4cd4eec4475de5e4addfbcef76.tar.gz
Fixed login scope check
-rw-r--r--mastodon/Mastodon.py4
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 + '".')
Powered by cgit v1.2.3 (git 2.41.0)