diff options
author | fwaggle <[email protected]> | 2022-11-06 09:58:03 +1100 |
---|---|---|
committer | fwaggle <[email protected]> | 2022-11-06 09:58:03 +1100 |
commit | 1830b22bcbc3cc0785b7c0805375310e461e9103 (patch) | |
tree | d7896a554eead303de58f5ed233451047c4bf5df /mastodon | |
parent | 1b64477862b3238d53828b27722feeb8819db33f (diff) | |
download | mastodon.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.
Diffstat (limited to 'mastodon')
-rw-r--r-- | mastodon/Mastodon.py | 4 |
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': |