aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2017-12-11 14:18:54 +0100
committerLorenz Diener <[email protected]>2017-12-11 14:18:54 +0100
commit0b701ca6acf9b906dc1a35be56c7cf917822e7fd (patch)
tree491b3a4533ca10d8772d0b3246d98d6a685c3b20 /mastodon/Mastodon.py
parent3bf2299e7e2c89b83aefe079ded3e8e6ee668517 (diff)
downloadmastodon.py-0b701ca6acf9b906dc1a35be56c7cf917822e7fd.tar.gz
Make the version check be not wrong
Diffstat (limited to 'mastodon/Mastodon.py')
-rw-r--r--mastodon/Mastodon.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 0317a75..0eb76bd 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -45,9 +45,9 @@ def api_version(version):
45 major, minor, patch = parse_version_string(version) 45 major, minor, patch = parse_version_string(version)
46 if major > self.mastodon_major: 46 if major > self.mastodon_major:
47 raise MastodonVersionError("Specified version does not support this API endpoint (Available from " + version + ")") 47 raise MastodonVersionError("Specified version does not support this API endpoint (Available from " + version + ")")
48 elif minor > self.mastodon_minor: 48 elif major == self.mastodon_major and minor > self.mastodon_minor:
49 raise MastodonVersionError("Specified version does not support this API endpoint (Available from " + version + ")") 49 raise MastodonVersionError("Specified version does not support this API endpoint (Available from " + version + ")")
50 elif patch > self.mastodon_patch: 50 elif major == self.mastodon_major and minor == self.mastodon_minor and patch > self.mastodon_patch:
51 raise MastodonVersionError("Specified version does not support this API endpoint (Available from " + version + ")") 51 raise MastodonVersionError("Specified version does not support this API endpoint (Available from " + version + ")")
52 return function(self, *args, **kwargs) 52 return function(self, *args, **kwargs)
53 function.__doc__ = function.__doc__ + "\n\n *Minumum Mastodon version: " + version + "*" 53 function.__doc__ = function.__doc__ + "\n\n *Minumum Mastodon version: " + version + "*"
Powered by cgit v1.2.3 (git 2.41.0)