[Buildbot-devel] Subclassing FileUpload step

Dan Savilonis djs at n-cube.org
Wed Nov 24 17:04:41 UTC 2010


Hi all,

I am trying to write a buildstep based on FileUpload to upload a build
to the master and create a hyperlink to that build on the webstatus. I
haven't had issues subclassing other build steps, but when I tried to
subclass FileUpload, I cannot get it to work.

I have simplified the build step down to this:

class UploadBuild(FileUpload):

    def __init__(self, build, type='continuous'):
        FileUpload.__init__(self, "foo", "bar")

When I attempt to run this buildstep, I end up getting the following error:

2010-11-24 11:59:42-0500 [Broker,0,127.0.0.1] Unhandled Error
        Traceback (most recent call last):
          File "c:\Python27\lib\site-packages\twisted\internet\defer.py",
line 318, in callback
            self._startRunCallbacks(result)
          File "c:\Python27\lib\site-packages\twisted\internet\defer.py",
line 424, in _startRunCallbacks
            self._runCallbacks()
          File "c:\Python27\lib\site-packages\twisted\internet\defer.py",
line 441, in _runCallbacks
            self.result = callback(self.result, *args, **kw)
          File "c:\Python27\lib\site-packages\buildbot\process\builder.py",
line 888, in _startBuild_2
            d = build.startBuild(bs, self.expectations, sb)
        --- <exception caught here> ---
          File "c:\Python27\lib\site-packages\buildbot\process\base.py",
line 217, in startBuild
            self.setupBuild(expectations) # create .steps
          File "c:\Python27\lib\site-packages\buildbot\process\base.py",
line 272, in setupBuild
            step = factory(**args)
        exceptions.TypeError: __init__() got an unexpected keyword
argument 'masterdest'

Why does the FileUpload step work with these arguments, but my
subclass returns this error?

Thanks,
--
Dan




More information about the devel mailing list