def git(*args, **kwargs):
    try:
        p = subprocess.Popen(git_args() + list(args),
                             close_fds=True,
                             preexec_fn=unroot,
                             stdin=subprocess.PIPE,
                             stdout=subprocess.PIPE)
    except OSError:
        logging.error('git not found on PATH - exiting')
        sys.exit(1)
    stdout, stderr = p.communicate(kwargs.get('stdin'))
    if 0 != p.returncode and kwargs.get('raise_exc', True):
        raise GitError(p.returncode)
    return p.returncode, stdout
Context manager for creating and releasing a NoIdleAssertion.
dataset/ETHPy150Open devstructure/blueprint/blueprint/git.py/git--crossover with--dataset/ETHPy150Open google/macops/gmacpyutil/gmacpyutil/gmacpyutil.py/NoIdleAssertion