[Buildbot-devel] Easy question

Alex Escott AE at malaspina-labs.com
Thu Jan 26 23:09:17 UTC 2012


... for someone who knows python well (I don't).

I'm sub-classing ShellCommand, and want to pass in a URL for the build step to display in its table cell in the Waterfall. So I modified my c'tor to take in a url named "link":

class CycleProfiler(ShellCommand):

    htmlLink = None    

    def __init__(self, link, **kwargs):
        self.htmlLink = link
        ShellCommand.__init__(self, **kwargs)

Constructing it succeeds, no problems. But when the build step gets triggered, it dies with the following callstack in twistd.log:

2012-01-26 14:53:34-0800 [Broker,0,10.1.100.26] error while creating step, factory=MyClasses.CycleProfiler, ...
2012-01-26 14:53:34-0800 [Broker,0,10.1.100.26] Unhandled Error
	Traceback (most recent call last):
	  File "C:\Python27\lib\site-packages\twisted\internet\defer.py", line 361, in callback
	    self._startRunCallbacks(result)
	  File "C:\Python27\lib\site-packages\twisted\internet\defer.py", line 455, in _startRunCallbacks
	    self._runCallbacks()
	  File "C:\Python27\lib\site-packages\twisted\internet\defer.py", line 542, in _runCallbacks
	    current.result = callback(current.result, *args, **kw)
	  File "C:\Python27\lib\site-packages\buildbot-0.8.3p1-py2.7.egg\buildbot\process\builder.py", line 915, in _startBuild_2
	    d = build.startBuild(bs, self.expectations, sb)
	--- <exception caught here> ---
	  File "C:\Python27\lib\site-packages\buildbot-0.8.3p1-py2.7.egg\buildbot\process\base.py", line 231, in startBuild
	    self.setupBuild(expectations) # create .steps
	  File "C:\Python27\lib\site-packages\buildbot-0.8.3p1-py2.7.egg\buildbot\process\base.py", line 286, in setupBuild
	    step = factory(**args)
	exceptions.TypeError: __init__() takes exactly 2 arguments (1 given)


Any help is appreciated, thanks.




More information about the devel mailing list