aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mastodon/Mastodon.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index f6b9f1c..f1a9c5c 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -421,20 +421,20 @@ class Mastodon:
421 if not (self.api_base_url is None or try_base_url == self.api_base_url): 421 if not (self.api_base_url is None or try_base_url == self.api_base_url):
422 raise MastodonIllegalArgumentError('Mismatch in base URLs between files and/or specified') 422 raise MastodonIllegalArgumentError('Mismatch in base URLs between files and/or specified')
423 self.api_base_url = try_base_url 423 self.api_base_url = try_base_url
424
425 if not version_check_mode in ["created", "changed", "none"]:
426 raise MastodonIllegalArgumentError("Invalid version check method.")
427 self.version_check_mode = version_check_mode
424 428
425 # Versioning 429 # Versioning
426 if mastodon_version == None: 430 if mastodon_version == None and self.version_check_mode != 'none':
427 self.retrieve_mastodon_version() 431 self.retrieve_mastodon_version()
428 else: 432 elif self.version_check_mode != 'none':
429 try: 433 try:
430 self.mastodon_major, self.mastodon_minor, self.mastodon_patch = parse_version_string(mastodon_version) 434 self.mastodon_major, self.mastodon_minor, self.mastodon_patch = parse_version_string(mastodon_version)
431 except: 435 except:
432 raise MastodonVersionError("Bad version specified") 436 raise MastodonVersionError("Bad version specified")
433 437
434 if not version_check_mode in ["created", "changed", "none"]:
435 raise MastodonIllegalArgumentError("Invalid version check method.")
436 self.version_check_mode = version_check_mode
437
438 # Ratelimiting parameter check 438 # Ratelimiting parameter check
439 if ratelimit_method not in ["throw", "wait", "pace"]: 439 if ratelimit_method not in ["throw", "wait", "pace"]:
440 raise MastodonIllegalArgumentError("Invalid ratelimit method.") 440 raise MastodonIllegalArgumentError("Invalid ratelimit method.")
Powered by cgit v1.2.3 (git 2.41.0)