[Buildbot-devel] Adding a new attribute to LogFile

Derek Graham (ML) derek.m.graham+ml at gmail.com
Mon Dec 13 12:01:23 UTC 2010


I've tried to add a new attribute 'hidden' with accessor methods to LogFile
so that the waterfall doesn't show all log files for a build. However, I get
an error message which reports that such an attribute doesn't exist (it does
seem to find the accessor methods).

My buildbot runs from here and this is where I've modified the files:

/blah/lib/python2.6/site-packages/buildbot-0.8.1-py2.6.egg/

Here's what I've done:

   - I have modified IStatusLog in interfaces.py to add the methods hide()
   and isHidden() (I'll add an unHide/show when it's working).
   - In status/builder.py I added self.hidden = False to __init__() of
   LogFile and implemented the new interface methods
   - In status/web/waterfall.py I added to the loop in StepBox 'if
   logs[num].isHidden(): continue' to skip adding the log file name to the box
   - Then in my master.cfg, in the evaluateCommand function of a custom
   ShellCommand I call self.getLog(log_name).hide() and then print out
   self.getLog(log_name).isHidden(), which in the twistd.log says true
   - I deleted all *.pyc files
   - Restartedthe buildbot

When I refresh the waterfall status page I get:

/blah/lib/python2.6/site-packages/buildbot-0.8.1-py2.6.egg/buildbot/status/builder.py,
line 419 in isHidden
417
418  def isHidden(self):
419    return self.hidden
420
*Locals* self
buildbot.status.builder.LogFile instance @ 0x2a989c6ab8
<buildbot.status.builder.LogFile
instance at 0x2a989c6ab8>

<type 'exceptions.AttributeError'>: LogFile instance has no attribute
'hidden'
What I have missed?

Thanks for your help,

Derek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20101213/3d5dfda0/attachment.html>


More information about the devel mailing list