Make decorated functions actually return things

This commit is contained in:
Lorenz Diener 2017-12-11 14:02:57 +01:00
pare 9acfb0d3d8
commit 3bf2299e7e

Veure arxiu

@ -49,7 +49,7 @@ def api_version(version):
raise MastodonVersionError("Specified version does not support this API endpoint (Available from " + version + ")")
elif patch > self.mastodon_patch:
raise MastodonVersionError("Specified version does not support this API endpoint (Available from " + version + ")")
function(self, *args, **kwargs)
return function(self, *args, **kwargs)
function.__doc__ = function.__doc__ + "\n\n *Minumum Mastodon version: " + version + "*"
return decorate(function, wrapper)
return api_min_version_decorator