[Buildbot-commits] buildbot/buildbot/steps python.py,1.4,1.5

Brian Warner warner at users.sourceforge.net
Thu Oct 5 00:45:50 UTC 2006


Update of /cvsroot/buildbot/buildbot/buildbot/steps
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25037/buildbot/steps

Modified Files:
	python.py 
Log Message:
[project @ PyFlakes: ignore initial output lines that weren't emitted by pyflakes]

Original author: warner at allmydata.com
Date: 2006-10-05 00:39:11

Index: python.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/python.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- python.py	20 Sep 2006 06:33:35 -0000	1.4
+++ python.py	5 Oct 2006 00:45:48 -0000	1.5
@@ -65,7 +65,19 @@
             counts[m] = 0
             summaries[m] = []
 
+        first = True
         for line in StringIO(log.getText()).readlines():
+            # the first few lines might contain echoed commands from a 'make
+            # pyflakes' step, so don't count these as warnings. Stop ignoring
+            # the initial lines as soon as we see one with a colon.
+            if first:
+                if line.find(":") != -1:
+                    # there's the colon, this is the first real line
+                    first = False
+                    # fall through and parse the line
+                else:
+                    # skip this line, keep skipping non-colon lines
+                    continue
             if line.find("imported but unused") != -1:
                 m = "unused"
             elif line.find("*' used; unable to detect undefined names") != -1:





More information about the Commits mailing list