diff --git a/mastodon/authentication.py b/mastodon/authentication.py index 2074206..4c96061 100644 --- a/mastodon/authentication.py +++ b/mastodon/authentication.py @@ -321,7 +321,7 @@ class Mastodon(Internals): Returns the access token as a string. """ # Is the version > 4.4.0? Throw on trying to log in with password with a more informative message than the API error - if self.mastodon_major >= 4 and self.mastodon_minor >= 4: + if self.mastodon_major >= 4 and self.mastodon_minor >= 4 or self.mastodon_major > 4: raise MastodonIllegalArgumentError('Password flow is no longer supported in Mastodon 4.4.0 and later.') if username is not None and password is not None: