(func)
return wrapped
Decorator to make sure a function always returns a deferred
Decorator to make sure a function always returns a deferred
Decorator to make sure a function always returns a deferred
def defers(func):
    """Decorator to make sure a function always returns a deferred"""
    @wraps(func)
    def wrapped(*a, **kw):
        return defer.maybeDeferred(func, *a, **kw)
    return wrapped
def defers ( func ) : @ wraps ( func ) def wrapped ( * a , * * kw ) : return defer . maybeDeferred ( func , * a , * * kw ) return wrapped