From ead7b7fc5ed5fe4cd4eec4475de5e4addfbcef76 Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Thu, 24 Nov 2016 12:07:41 +0100 Subject: Fixed login scope check --- mastodon/Mastodon.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mastodon') 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: except: raise ValueError('Invalid user name, password or scopes.') - requested_scopes = " ".join(scopes) - received_scopes = " ".join(sorted(response["scopes"].split(" "))) + requested_scopes = " ".join(sorted(scopes)) + received_scopes = " ".join(sorted(response["scope"].split(" "))) if requested_scopes != received_scopes: raise ValueError('Granted scopes "' + received_scopes + '" differ from requested scopes "' + requested_scopes + '".') -- cgit v1.2.3