Exemple #1
0
def log_hook():
    """Log when a hook starts and stops its execution.

    Also log to stdout possible CalledProcessError exceptions raised executing
    the hook.
    """
    script = script_name()
    log(">>> Entering {}".format(script))
    try:
        yield
    except CalledProcessError as err:
        log('Exception caught:')
        log(err.output)
        raise
    finally:
        log("<<< Exiting {}".format(script))
Exemple #2
0
def log_hook():
    """Log when a hook starts and stops its execution.

    Also log to stdout possible CalledProcessError exceptions raised executing
    the hook.
    """
    script = script_name()
    log(">>> Entering {}".format(script))
    try:
        yield
    except CalledProcessError as err:
        log('Exception caught:')
        log(err.output)
        raise
    finally:
        log("<<< Exiting {}".format(script))
Exemple #3
0
def log_exit():
    log("<-- Exiting {}".format(script_name()))
Exemple #4
0
def log_entry():
    log("--> Entering {}".format(script_name()))
Exemple #5
0
def log_exit():
    log("<-- Exiting {}".format(script_name()))
Exemple #6
0
def log_entry():
    log("--> Entering {}".format(script_name()))