[Buildbot-devel] How to get the branch in PBListener?

Rod Taylor rod.taylor at gmail.com
Mon Nov 14 17:22:56 UTC 2011


Starting with a copy of clients/base.py I hacked it up to call out to
notify-send on my local machine so I get Gnome notifications for build
results.

I can't quite seem to get the name of the branch out of the build object. I
think I need some kind of build.callRemote().addCallback() mechanism but
cannot quite figure it out. I would like to add the branch name to the
messages prepared for notify-send.


class StatusClient(pb.Referenceable):
    """To use this, call my .connected method with a RemoteReference to the
    buildmaster's StatusClientPerspective object.
    """

    def remote_buildFinished(self, buildername, build, results):
        if results == 0:
            if build and buildername in ['Stable', 'Development',
'Feature']:
                call(["notify-send", "--icon=gtk-add", buildername, "%s
Build Successful" % buildername])
        elif build:
            call(["notify-send", "--icon=gtk-remove", buildername, "%s
threw an error during the build" % buildername])



Thanks,

Rod
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20111114/18695088/attachment.html>


More information about the devel mailing list