From: Chris Lamb Date: Sat, 31 Oct 2009 09:43:52 +0000 (+0000) Subject: Add a docstring for parse_lintian_output X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=c91496e85403f61439ffce6326ddd8c32cad5751;p=dak.git Add a docstring for parse_lintian_output Signed-off-by: Chris Lamb --- diff --git a/daklib/lintian.py b/daklib/lintian.py index fbd1bb72..c0ee316a 100644 --- a/daklib/lintian.py +++ b/daklib/lintian.py @@ -1,6 +1,13 @@ from regexes import re_parse_lintian def parse_lintian_output(output): + """ + Parses Lintian output and returns a generator with the data. + + >>> list(parse_lintian_output('W: pkgname: some-tag path/to/file')) + [('W', 'pkgname', 'some-tag', 'path/to/file')] + """ + for line in output.split('\n'): m = re_parse_lintian.match(line) if m: