def load_config(self, filename=None):
    config = {}
    try:
        with open(filename, 'r') as f:
            config = yaml.safe_load(f.read())
    except Exception as e:
        logger.fatal(e)
        exit(1)
    logger.info('Loaded {} items from {}'.format(len(config), filename))
    return config
def load_config(self, filename=None):
    config = {}
    try:
        with open(filename, 'r') as f:
            config = yaml.safe_load(f.read())
    except Exception as e:
        logger.fatal(e)
        exit(1)
    logger.info('Loaded {} items from {}'.format(len(config), filename))
    return config