From c91496e85403f61439ffce6326ddd8c32cad5751 Mon Sep 17 00:00:00 2001 From: Chris Lamb Date: Sat, 31 Oct 2009 09:43:52 +0000 Subject: [PATCH] Add a docstring for parse_lintian_output Signed-off-by: Chris Lamb --- daklib/lintian.py | 7 +++++++ 1 file changed, 7 insertions(+) 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: -- 2.39.5