[Buildbot-devel] Issue with WithProperty()

Stefan Seefeld stefan at seefeld.name
Thu Mar 24 17:52:24 UTC 2011


Hello,

I have just tried to inject a timestamp into a name argument used by a 
ShellCommand:

f1.addStep(shell.ShellCommand(name='gen', workdir='.',
                               command=['make', 
WithProperties('data-%(now)s.txt',
                                                               
now=lambda _: time.strftime("%Y-%m-%d"))]))



Reconfiguring the build master yields this exception / traceback:



...
           File 
"/usr/lib64/python2.7/site-packages/twisted/internet/base.py", line 796, 
in runUntilCurrent
             call.func(*call.args, **call.kw)
         --- <exception caught here> ---
           File "/usr/lib/python2.7/site-packages/buildbot/master.py", 
line 488, in loadTheConfigFile
             self.loadConfig(f)
           File "/usr/lib/python2.7/site-packages/buildbot/master.py", 
line 506, in loadConfig
             exec f in localDict
           File "/home/stefan/work/buildbot/sandbox/master/master.cfg", 
line 124, in <module>
             now=lambda _: time.strftime("%Y-%m-%d"))))
         exceptions.TypeError: __init__() got an unexpected keyword 
argument 'now'

Is there anything wrong with how I use 'WithProperties' above ? (I have 
taken the code from
http://buildbot.net/buildbot/docs/current/WithProperties.html#WithProperties.)


Thanks,
         Stefan

-- 

       ...ich hab' noch einen Koffer in Berlin...





More information about the devel mailing list