vcp/commands.py
def post_process(func):
    """Calls the project handler same named function

    Note: the project handler may add some extra arguments to the command,
          so when use this decorator, add **kwargs to the end of the arguments

    """
    @wraps(func)
    def wrapper(*args, **kwargs):
        res = func(*args, **kwargs)
        project_command = args[0]
        project_handler = project_command.vcp.project_handler
        if not project_handler:
            return res
        kwargs['command_result'] = res
        getattr(project_handler, func.__name__)(**kwargs)
        return res

    return wrapper
def post_process(func):
    """Calls the project handler same named function

    Note: the project handler may add some extra arguments to the command,
          so when use this decorator, add **kwargs to the end of the arguments

    """
    @wraps(func)
    def wrapper(*args, **kwargs):
        res = func(*args, **kwargs)
        project_command = args[0]
        project_handler = project_command.vcp.project_handler
        if not project_handler:
            return res
        kwargs['command_result'] = res
        getattr(project_handler, func.__name__)(**kwargs)
        return res

    return wrapper
Calls the project handler same named function

    Note: the project handler may add some extra arguments to the command,
          so when use this decorator, add **kwargs to the end of the arguments