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()
评论列表
文章目录