[Buildbot-devel] subclass oddity

Christian Unger christian.unger at mac.com
Sun Feb 14 11:01:43 UTC 2010


Hi,

I try to subclass ShellCommand like so:

> from buildbot.steps.shell import ShellCommand
> 
> class myClass(ShellCommand):
> 	
> 	name = "myClass"
> 	haltOnFailure = 1
> 	flunkOnFailure = 1
> 	description = ["building"]
> 	descriptionDone = [name]
> 	
> 	def __init__( self, **kwargs ):
> 
> 		aKey ='anAction'
> 		aCommand=[]
> 		aCommand.extend(['aCommonTool'])
> 
> 		# iterate through kwargs
> 		if kwargs.has_key('aKey'):
> 			aCommand.append(kwargs['aKey'])
> 			action = kwargs['aKey']
> 			del kwargs['aKey']
> 		else:
> 			aCommand.append(aKey)
> 		
> 		if kwargs.has_key('anotherKey'):
> 			aCommand.extend(['-anotherKey', kwargs['anotherKey']])
> 			del kwargs['anotherKey']
> 
> 		self.setCommand(aCommand)
> 		
> 		ShellCommand.__init__(self, **kwargs)


and in my factory call it like so:

> aFactory.addSteps([
>                           myClass(aKey ='Value', anotherKey = aValue, workdir='./path')
> ])

if I restart my master it would ignore the buildstep arguments - why?

any help would be very much appreciated thanks in advance!

__
cu
christian unger








-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2666 bytes
Desc: not available
URL: <http://buildbot.net/pipermail/devel/attachments/20100214/5fc2eabe/attachment.bin>


More information about the devel mailing list