#1837: "Using LogFiles in custom BuildSteps" example does not work
-------------------------+-----------------------
Reporter:  thomaswayden  |      Owner:
    Type:  undecided     |     Status:  new
Priority:  major         |  Milestone:  undecided
 Version:  0.8.3p1       |   Keywords:
-------------------------+-----------------------
 The example given at http://buildbot.net/buildbot/docs/latest/BuildStep-
 LogFiles.html
 to filter the output of a BuildStep:

 {{{
          def createSummary(self, log):
              warnings = []
              for line in log.readlines():
                  if "warning:" in line:
                      warnings.append()
              self.addCompleteLog('warnings', "".join(warnings))
 }}}

 does not work.

 Instead you have to use log.getText() to get the text of the log.

 {{{
         sio = StringIO.StringIO( log.getText() )
         for line in sio.readlines():
 }}}

 would work.

-- 
Ticket URL: <http://trac.buildbot.net/ticket/1837>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Buildbot-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/buildbot-commits

Reply via email to