[Buildbot-commits] [Buildbot] #1837: "Using LogFiles in custom BuildSteps" example does not work

Buildbot nobody at buildbot.net
Wed Feb 23 10:55:30 UTC 2011


#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


More information about the Commits mailing list