[Buildbot-devel] help with Python and Property

Todd Cooper todd_cooper at yahoo.com
Fri Sep 23 15:30:43 UTC 2011

I am fairly new to Python and I am having a problem with an accessor function to the property.

Problem is I want to set a property of  the build depending on the slave name.

How can I pass a result of the Property or WithProperties to re.search?
It keeps giving me the error<type 'exceptions.TypeError'>: expected string or buffer

def check_h4_slavename(rc,stdout,stderr):
    ghs_lmhost = ""
    ghs_lmport = "2010"
    slavename = WithProperties("%(slavename)s")
    if re.search("bigbuild", slavename):
        ghs_lmhost = "localhost"
        ghs_lmport = ""
    return { 'GHS_LMHOST' : ghs_lmhost,
             'GHS_LMPORT' : ghs_lmport }

incrFactory.addStep(shell.SetProperty(command="echo hello", 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20110923/12f1c45f/attachment.html>

More information about the devel mailing list