@contextmanager
def cd(new_dir):

    # Store current directory
    cwd = os.path.abspath(os.getcwd())

    # Move into directory and yield control
    os.chdir(new_dir)

    try:
        yield

    finally:
        # Return to current directory
        os.chdir(cwd)
Adds an entry to the candidate certificate map.
dataset/ETHPy150Open jlisee/xpkg/python/xpkg/util.py/cd--crossover with--dataset/ETHPy150Open ganeti/ganeti/lib/config/__init__.py/ConfigWriter.AddNodeToCandidateCerts