From 0b701ca6acf9b906dc1a35be56c7cf917822e7fd Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Mon, 11 Dec 2017 14:18:54 +0100 Subject: Make the version check be not wrong --- mastodon/Mastodon.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mastodon') 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): major, minor, patch = parse_version_string(version) if major > self.mastodon_major: raise MastodonVersionError("Specified version does not support this API endpoint (Available from " + version + ")") - elif minor > self.mastodon_minor: + elif major == self.mastodon_major and minor > self.mastodon_minor: raise MastodonVersionError("Specified version does not support this API endpoint (Available from " + version + ")") - elif patch > self.mastodon_patch: + elif major == self.mastodon_major and minor == self.mastodon_minor and patch > self.mastodon_patch: raise MastodonVersionError("Specified version does not support this API endpoint (Available from " + version + ")") return function(self, *args, **kwargs) function.__doc__ = function.__doc__ + "\n\n *Minumum Mastodon version: " + version + "*" -- cgit v1.2.3