mods.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:fac 作者: mickael9 项目源码 文件源码
def _find(cls, pattern, manager, name, version):
        name = '*' if name is None else name

        installed = glob(
            os.path.join(
                manager.config.mods_directory,
                pattern
            )
        )
        for path in installed:
            try:
                mod = cls(manager, path)

            except Exception as ex:
                print('Warning: invalid mod %s: %s' % (path, ex))
                continue

            if not fnmatchcase(mod.name, name):
                continue

            if version is not None and version != mod.version:
                continue

            yield mod
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号