members.py 文件源码

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

项目:governance-uc 作者: openstack 项目源码 文件源码
def _parse_members_file(app, filename):
    """Load the members file and return each row as a dictionary.
    """
    with open(filename, 'r') as f:
        for linum, line in enumerate(f, 1):
            line = line.strip()
            if not line or line.startswith('#'):
                continue
            m = _PATTERN.match(line)
            if not m:
                app.warning('Could not parse line %d of %s: %r' %
                            (linum, filename, line))
                continue
            yield m.groupdict()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号