[Buildbot-commits] buildbot/buildbot buildslave.py,1.2,1.3

Brian Warner warner at users.sourceforge.net
Tue Aug 7 20:23:41 UTC 2007


Update of /cvsroot/buildbot/buildbot/buildbot
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10394/buildbot

Modified Files:
	buildslave.py 
Log Message:
[project @ have BuildSlaves track their associated SlaveBuilders]

Original author: warner at lothar.com
Date: 2007-08-07 19:59:19+00:00

Index: buildslave.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/buildslave.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- buildslave.py	7 Aug 2007 19:48:54 -0000	1.2
+++ buildslave.py	7 Aug 2007 20:23:39 -0000	1.3
@@ -23,6 +23,7 @@
         self.slave_status = SlaveStatus(name)
         self.slave = None # a RemoteReference to the Bot, when connected
         self.slave_commands = None
+        self.slavebuilders = []
 
     def update(self, new):
         """
@@ -221,6 +222,15 @@
     def perspective_keepalive(self):
         pass
 
+    def addSlaveBuilder(self, sb):
+        log.msg("%s adding %s" % (self, sb))
+        self.slavebuilders.append(sb)
+
+    def removeSlaveBuilder(self, sb):
+        log.msg("%s removing %s" % (self, sb))
+        if sb in self.slavebuilders:
+            self.slavebuilders.remove(sb)
+
     def canStartBuild(self):
         """
         I am called when a build is requested to see if this buildslave





More information about the Commits mailing list