[Buildbot-commits] buildbot/buildbot/status words.py,1.38,1.39

Brian Warner warner at users.sourceforge.net
Thu Aug 11 21:58:44 UTC 2005


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

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

repair bitrot in the IRC status bot

	* buildbot/master.py (DebugPerspective.perspective_pokeIRC): fix
	this, it got broken at some point in the last few releases
	* buildbot/status/words.py (IrcBuildRequest): reply was broken
	(IrcStatusBot.emit_status): handle new IBuilderStatus.getState,
	specifically the removal of ETA information from the tuple


Index: words.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/words.py,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- words.py	19 Jul 2005 23:12:01 -0000	1.38
+++ words.py	11 Aug 2005 21:58:42 -0000	1.39
@@ -50,10 +50,11 @@
         response = "build #%d forced" % s.getNumber()
         if eta is not None:
             response = "build forced [ETA %s]" % self.parent.convertTime(eta)
-        self.parent.reply(reply, response)
-        self.parent.reply(reply, "I'll give a shout when the build finishes")
+        self.parent.reply(self.reply, response)
+        self.parent.reply(self.reply,
+                          "I'll give a shout when the build finishes")
         d = s.waitUntilFinished()
-        d.addCallback(self.parent.buildFinished, reply)
+        d.addCallback(self.parent.buildFinished, self.reply)
 
 
 class IrcStatusBot(irc.IRCClient):
@@ -351,7 +352,7 @@
     def emit_status(self, reply, which):
         b = self.getBuilder(which)
         str = "%s: " % which
-        state, ETA, build = b.getState()
+        state, build = b.getState()
         str += state
         if state == "idle":
             last = b.getLastFinishedBuild()
@@ -359,13 +360,12 @@
                 start,finished = last.getTimes()
                 str += ", last build %s secs ago: %s" % \
                        (int(util.now() - finished), " ".join(last.getText()))
-        if state == "waiting":
-            str += " [next build in %s]" % self.convertTime(ETA)
         if state == "building":
             build = b.getCurrentBuild()
             assert build
             step = build.getCurrentStep()
             str += " (%s)" % " ".join(step.getText())
+            ETA = build.getETA()
             if ETA is not None:
                 str += " [ETA %s]" % self.convertTime(ETA)
         self.reply(reply, str)





More information about the Commits mailing list