[Buildbot-devel] buildstep factory
AndyHowell at austin.rr.com
Sun Jul 25 23:26:39 UTC 2010
On 07/24/2010 10:36 PM, Andy Howell wrote:
> I'm trying to make a custom build step that has an extra attribute. I followed the example:
> My buildstep looks like:
> class RaiPrepBuild(Compile):
> """Prepare build, making packages and dependencies"""
> def __init__(self, make_extra=None, **kwargs):
> Compile.__init__(self, **kwargs)
> def start(self):
> """Override shell.Compile.start method."""
> if self.make_extra:
> self.command.append("make_extra=%s" % self.make_extra)
> When the build step is created however, I get an exception in the start() method:
> exceptions.AttributeError: RaiPrepBuild instance has no attribute 'make_extra'
> I can't figure out what this is. I trace through the code for process/base.py
> setupBuild(). The factory does have the "make_extra" argument, but the RaiPrepBuild does
> not have it when the step is built.
> Any idea what I'm doing wrong?
Sorry to reply to my own post. I got this working by adding self.make_extra=make_extra to
def __init__(self, make_extra=None, **kwargs):
More information about the devel