def get_config():
    config_files = (
        './github-notify.yaml',
        os.path.expanduser('~/.github-notify.yaml'),
        '/etc/github-notify.yaml'
    )
    for config_file in config_files:
        try:
            with open(os.path.realpath(config_file)) as f:
                config = yaml.load(f)
        except:
            pass
        else:
            return config

    raise SystemExit('Config file not found at: %s' % ', '.join(config_files))
dataset/ETHPy150Open sivel/github-notify/github-notify.py/get_config/original