Permalink
Browse files

Fix insufficient args for _substantiate in detached

  • Loading branch information...
1 parent f48c37c commit 2d09b053a661251072fb4546b86a765ed95791e5 John Carr committed Apr 23, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 master/buildbot/buildslave.py
@@ -636,6 +636,7 @@ class AbstractLatentBuildSlave(AbstractBuildSlave):
substantiated = False
substantiation_deferred = None
+ substantiation_build = None
build_wait_timer = None
_shutdown_callback_handle = None
@@ -672,6 +673,7 @@ def substantiate(self, sb, build):
self.missing_timeout,
self._substantiation_failed, defer.TimeoutError())
self.substantiation_deferred = defer.Deferred()
+ self.substantiation_build = build
if self.slave is None:
d = self._substantiate(build) # start up instance
d.addErrback(log.err, "while substantiating")
@@ -716,14 +718,15 @@ def attached(self, bot):
def detached(self, mind):
AbstractBuildSlave.detached(self, mind)
if self.substantiation_deferred is not None:
- d = self._substantiate()
+ d = self._substantiate(self.substantiation_build)
d.addErrback(log.err, 'while re-substantiating')
def _substantiation_failed(self, failure):
self.missing_timer = None
if self.substantiation_deferred:
d = self.substantiation_deferred
self.substantiation_deferred = None
+ self.substantiation_build = None
d.errback(failure)
self.insubstantiate()
# notify people, but only if we're still in the config
@@ -802,6 +805,7 @@ def _soft_disconnect(self, fast=False):
# request to "go away".
d = self.substantiation_deferred
self.substantiation_deferred = None
+ self.substantiation_build = None
d.errback(failure.Failure(
RuntimeError("soft disconnect aborted substantiation")))
if self.missing_timer:
@@ -860,6 +864,7 @@ def _set_failed(why):
if self.substantiation_deferred:
d = self.substantiation_deferred
self.substantiation_deferred = None
+ self.substantiation_build = None
d.errback(why)
if self.missing_timer:
self.missing_timer.cancel()
@@ -876,6 +881,7 @@ def _substantiated(res):
log.msg("Firing %s substantiation deferred with success" % self.slavename)
d = self.substantiation_deferred
self.substantiation_deferred = None
+ self.substantiation_build = None
d.callback(True)
# note that the missing_timer is already handled within
# ``attached``

0 comments on commit 2d09b05

Please sign in to comment.