def get_config(path):
    try:
        with open(path) as f:
            data = f.read()
    except __HOLE__ as e:
        if e.errno == errno.ENOENT:
            data = None
        else:
            raise e

    if data is None:
        return {}
    else:
        # assume config is a dict
        return yaml.safe_load(data)
dataset/ETHPy150Open rcbops/rpc-openstack/scripts/update-yaml.py/get_config