[Buildbot-commits] buildbot/buildbot/slave bot.py,1.14,1.15

Brian Warner warner at users.sourceforge.net
Fri Oct 7 18:45:44 UTC 2005


Update of /cvsroot/buildbot/buildbot/buildbot/slave
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7377/buildbot/slave

Modified Files:
	bot.py 
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-322
Creator:  Brian Warner <warner at lothar.com>

inherit from StatusReceiver properly

	* buildbot/slave/bot.py (SlaveBuilder.activity): survive
	bot.SlaveBuilder being disowned in the middle of a build

	* buildbot/status/base.py (StatusReceiverMultiService): oops, make
	this inherit from StatusReceiver. Also upcall in __init__. This
	fixes the embarrasing crash when the new buildSetSubmitted method
	is invoked and Waterfall/etc don't implement their own.
	* buildbot/test/test_run.py: add a TODO note about a test to catch
	just this sort of thing.

--This line, and those below, will be ignored--
Files to commit:
   <can't compute list>

This list might be incomplete or outdated if editing the log
message was not invoked from an up-to-date changes buffer!


Index: bot.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/slave/bot.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- bot.py	19 Jul 2005 23:12:00 -0000	1.14
+++ bot.py	7 Oct 2005 18:45:41 -0000	1.15
@@ -72,6 +72,10 @@
     def setServiceParent(self, parent):
         service.Service.setServiceParent(self, parent)
         self.bot = self.parent
+        # note that self.parent will go away when the buildmaster's config
+        # file changes and this Builder is removed (possibly because it has
+        # been changed, so the Builder will be re-added again in a moment).
+        # This may occur during a build, while a step is running.
 
     def setBuilddir(self, builddir):
         assert self.parent
@@ -86,10 +90,12 @@
             self.stopCommand()
 
     def activity(self):
-        #bot = self.parent
-        #buildslave = bot.parent
-        #bf = buildslave.bf
-        self.parent.parent.bf.activity()
+        bot = self.parent
+        if bot:
+            buildslave = bot.parent
+            if buildslave:
+                bf = buildslave.bf
+                bf.activity()
 
     def remote_setMaster(self, remote):
         self.remote = remote





More information about the Commits mailing list