diff options
-rw-r--r-- | mastodon/Mastodon.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index dce2081..6afab55 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -316,8 +316,6 @@ class Mastodon: | |||
316 | raise MastodonIllegalArgumentError("Invalid ratelimit method.") | 316 | raise MastodonIllegalArgumentError("Invalid ratelimit method.") |
317 | 317 | ||
318 | # Token loading | 318 | # Token loading |
319 | if self.client_id is None and self.access_token is None: | ||
320 | raise MastodonIllegalArgumentError('No credentials were given.') | ||
321 | if self.client_id is not None: | 319 | if self.client_id is not None: |
322 | if os.path.isfile(self.client_id): | 320 | if os.path.isfile(self.client_id): |
323 | with open(self.client_id, 'r') as secret_file: | 321 | with open(self.client_id, 'r') as secret_file: |
@@ -2560,7 +2558,9 @@ class MastodonNotFoundError(MastodonAPIError): | |||
2560 | class MastodonUnauthorizedError(MastodonAPIError): | 2558 | class MastodonUnauthorizedError(MastodonAPIError): |
2561 | """Raised when the mastodon API returns a 401 Unauthorized error | 2559 | """Raised when the mastodon API returns a 401 Unauthorized error |
2562 | 2560 | ||
2563 | This happens when an OAuth token is invalid or has been revoked.""" | 2561 | This happens when an OAuth token is invalid or has been revoked, |
2562 | or when trying to access an endpoint that can't be used without | ||
2563 | authentication without providing credentials.""" | ||
2564 | pass | 2564 | pass |
2565 | 2565 | ||
2566 | 2566 | ||