import yaml


def load_config(config_file):
    """Open the YAML configuration file given in parameter"""
    with open(config_file, 'r') as stream:
        try:
            return yaml.safe_load(stream)
        except yaml.YAMLError as exc:
            print("[Error] - Error while opening the YAML conf file: {}".format(exc))