def from_dir(path):
    repos = []
    if os.path.isdir(path):
        for _file in sorted(os.listdir(path)):
            _file = os.path.join(path, _file)
            if not _file.endswith('.repo'):
                continue
            repos += from_file(_file)
    return repos
Read repository configuration from a directory containing YUM configs.
dataset/ETHPy150Open ryanuber/pakrat/pakrat/repos.py/from_dir