[Buildbot-commits] buildbot/buildbot/status builder.py,1.87,1.88

Brian Warner warner at users.sourceforge.net
Fri Sep 15 14:48:55 UTC 2006


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

Modified Files:
	builder.py 
Log Message:
[project @ enhance IStatusLog.readlines to accept a channel= argument]

Original author: warner at lothar.com
Date: 2006-09-08 21:55:02

Index: builder.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/builder.py,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- builder.py	15 Sep 2006 14:48:44 -0000	1.87
+++ builder.py	15 Sep 2006 14:48:53 -0000	1.88
@@ -338,13 +338,14 @@
             else:
                 yield leftover
 
-    def readlines(self):
+    def readlines(self, channel=STDOUT):
         """Return an iterator that produces newline-terminated lines,
         excluding header chunks."""
         # TODO: make this memory-efficient, by turning it into a generator
         # that retrieves chunks as necessary, like a pull-driven version of
         # twisted.protocols.basic.LineReceiver
-        io = StringIO(self.getText())
+        alltext = "".join(self.getChunks([channel], onlyText=True))
+        io = StringIO(alltext)
         return io.readlines()
 
     def subscribe(self, receiver, catchup):





More information about the Commits mailing list