[Buildbot-devel] Subclassing FileUpload step

Dustin J. Mitchell dustin at v.igoro.us
Wed Nov 24 19:00:50 UTC 2010


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