aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfwaggle <[email protected]>2022-11-06 09:58:03 +1100
committerfwaggle <[email protected]>2022-11-06 09:58:03 +1100
commit1830b22bcbc3cc0785b7c0805375310e461e9103 (patch)
treed7896a554eead303de58f5ed233451047c4bf5df
parent1b64477862b3238d53828b27722feeb8819db33f (diff)
downloadmastodon.py-1830b22bcbc3cc0785b7c0805375310e461e9103.tar.gz
Fix gotosocial crash in search()
Set a default 1.0.0 version if nothing else alters it so that version checks don't raise an Exception. Fixes #249.
-rw-r--r--mastodon/Mastodon.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 296921e..16f2556 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -425,6 +425,10 @@ class Mastodon:
425 if not version_check_mode in ["created", "changed", "none"]: 425 if not version_check_mode in ["created", "changed", "none"]:
426 raise MastodonIllegalArgumentError("Invalid version check method.") 426 raise MastodonIllegalArgumentError("Invalid version check method.")
427 self.version_check_mode = version_check_mode 427 self.version_check_mode = version_check_mode
428
429 self.mastodon_major = 1
430 self.mastodon_minor = 0
431 self.mastodon_patch = 0
428 432
429 # Versioning 433 # Versioning
430 if mastodon_version == None and self.version_check_mode != 'none': 434 if mastodon_version == None and self.version_check_mode != 'none':
Powered by cgit v1.2.3 (git 2.41.0)