def always_wait_until_passes(timeout, retry_interval, exceptions=Exception):
    'Decorator to call wait_until_passes(...) every time for a decorated function/method'

    def wait_until_passes_decorator(func):
        'Callable object that must be returned by the @always_wait_until_passes decorator'

        @wraps(func)
        def wrapper(*args, **kwargs):
            'pre-callback, target function call and post-callback'
            return wait_until_passes(timeout, retry_interval, func, exceptions, *args, **kwargs)
        return wrapper
    return wait_until_passes_decorator
Decorator to call wait_until_passes(...) every time for a decorated function/method
def always_wait_until_passes(timeout, retry_interval, exceptions=Exception):
    

    def wait_until_passes_decorator(func):
        'Callable object that must be returned by the @always_wait_until_passes decorator'

        @wraps(func)
        def wrapper(*args, **kwargs):
            'pre-callback, target function call and post-callback'
            return wait_until_passes(timeout, retry_interval, func, exceptions, *args, **kwargs)
        return wrapper
    return wait_until_passes_decorator