Adapts LockError to HTTP. If an exception is not thrown, the git_action has the lock (and must release it!)

def acquire_lock_raise(git_action, fail_msg=''):
    """Adapts LockError to HTTP. If an exception is not thrown, the git_action has the lock (and must release it!)
    """
    try:
        git_action.acquire_lock()
    except LockError as e:
        msg = '{o} Details: {d}'.format(o=fail_msg, d=e.message)
        _LOG.debug(msg)
        raise GitWorkflowError(msg)