Fixed login scope check

This commit is contained in:
Lorenz Diener 2016-11-24 12:07:41 +01:00
pare 68899a0cc4
commit ead7b7fc5e

Veure arxiu

@ -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 + '".')