]> git.decadent.org.uk Git - dak.git/commitdiff
Add a docstring for parse_lintian_output
authorChris Lamb <lamby@debian.org>
Sat, 31 Oct 2009 09:43:52 +0000 (09:43 +0000)
committerChris Lamb <lamby@debian.org>
Sat, 31 Oct 2009 23:00:12 +0000 (23:00 +0000)
Signed-off-by: Chris Lamb <lamby@debian.org>
daklib/lintian.py

index fbd1bb7239af3f67d0b1a2625dfa46d04b1b0649..c0ee316a6e4a172e7690fd7a9991e73b04afe0ab 100644 (file)
@@ -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: