I found out what the problem was : the return value chain was broken from the start. There was no return before the getattr :
@staticmethod
def check_short_name(method):
def wrapper(self, short_name, *args, **kwargs):
if short_name != self.short_name:
try:
**return** getattr(self.collection.iterate(), method.__name__)(short_name, *args, **kwargs)
except StopIteration:
raise Exception("item \"%s\" is not a member of %s, or method \"%s\" is not defined for any member of %s" % (short_name, self.collection.name, method.__name__, self.collection.name))
else:
self.collection.rewind()
return method(self, short_name, *args, **kwargs)
return wrapper