import yaml


def get_existing_config(dest):
    """Returns the existing configuration or an empty dict.
    """
    try:
        with open(dest, 'r') as stream:
            return yaml.safe_load(stream)
    except (yaml.YAMLError, FileNotFoundError):
        pass

    return dict()