[Buildbot-devel] Subclassing FileUpload step

Dan Savilonis djs at n-cube.org
Tue Nov 30 18:51:39 UTC 2010


I was wondering about that. I found that matching the constructor
arguments exactly makes it work. Unfortunately, that makes overriding
the constructor pretty much useless, since the idea was to provide a
different set of arguments. In my case, I wanted to provide a build
file and type, and hide the details of the transfer that's actually
occurring, as you can see in the original case I presented. Any
thoughts on how I could do this?

Dan

On Wed, Nov 24, 2010 at 2:00 PM, Dustin J. Mitchell <dustin at v.igoro.us> wrote:
> On Wed, Nov 24, 2010 at 11:04 AM, Dan Savilonis <djs at n-cube.org> wrote:
>>    def __init__(self, build, type='continuous'):
>>        FileUpload.__init__(self, "foo", "bar")
>
> Oh, I'm sorry!  There's this weird stuff with the addFactoryArguments,
> as basically every argument to the constructor will be re-supplied to
> a constructor of a fresh Step object when the time comes to execute.
> So you'll need to add all of the FileUpload constructor arguments to
> your constructor, as well.  You can just ignore those that you
> override, and pass the rest on to FileUpload.__init__.
>
> It's not particularly elegant..
>
> Dustin
>




More information about the devel mailing list