diff options
-rw-r--r-- | mastodon/Mastodon.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index b276291..2d51561 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -44,16 +44,16 @@ def api_version(created_ver, last_changed_ver): | |||
44 | def wrapper(function, self, *args, **kwargs): | 44 | def wrapper(function, self, *args, **kwargs): |
45 | if not self.version_check_mode == "none": | 45 | if not self.version_check_mode == "none": |
46 | if self.version_check_mode == "created": | 46 | if self.version_check_mode == "created": |
47 | version = created_version | 47 | version = created_ver |
48 | else: | 48 | else: |
49 | version = last_changed_ver | 49 | version = last_changed_ver |
50 | major, minor, patch = parse_version_string(version) | 50 | major, minor, patch = parse_version_string(version) |
51 | if major > self.mastodon_major: | 51 | if major > self.mastodon_major: |
52 | raise MastodonVersionError("Version check failed (Need version " + version + ")") | 52 | raise MastodonVersionError("Version check failed (Need version " + version + ")") |
53 | elif major == self.mastodon_major and minor > self.mastodon_minor: | 53 | elif major == self.mastodon_major and minor > self.mastodon_minor: |
54 | raise MastodonVersionError("Version check failed (Need version " + version + ")") | 54 | raise MastodonVersionError("Version check failed (Need version " + version + ")") |
55 | elif major == self.mastodon_major and minor == self.mastodon_minor and patch > self.mastodon_patch: | 55 | elif major == self.mastodon_major and minor == self.mastodon_minor and patch > self.mastodon_patch: |
56 | raise MastodonVersionError("Version check failed (Need version " + version + ")") | 56 | raise MastodonVersionError("Version check failed (Need version " + version + ")") |
57 | return function(self, *args, **kwargs) | 57 | return function(self, *args, **kwargs) |
58 | function.__doc__ = function.__doc__ + "\n\n *Added: Mastodon v" + created_ver + ", last changed: Mastodon v" + last_changed_ver + "*" | 58 | function.__doc__ = function.__doc__ + "\n\n *Added: Mastodon v" + created_ver + ", last changed: Mastodon v" + last_changed_ver + "*" |
59 | return decorate(function, wrapper) | 59 | return decorate(function, wrapper) |