Skip to content

Commit

Permalink
Store a copy of the slave's path module on Build.
Browse files Browse the repository at this point in the history
This is saves navigating to through the slavebuilder
and slave each time this is needed.
  • Loading branch information
tomprince committed May 18, 2012
1 parent ade94e1 commit 78c9e45
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion master/buildbot/process/build.py
Expand Up @@ -184,13 +184,15 @@ def setupProperties(self):
def setupSlaveBuilder(self, slavebuilder):
self.slavebuilder = slavebuilder

self.path_module = slavebuilder.slave.path_module

# navigate our way back to the L{buildbot.buildslave.BuildSlave}
# object that came from the config, and get its properties
buildslave_properties = slavebuilder.slave.properties
self.getProperties().updateFromProperties(buildslave_properties)
if slavebuilder.slave.slave_basedir:
self.setProperty("workdir",
slavebuilder.slave.path_module.join(
self.path_module.join(
slavebuilder.slave.slave_basedir,
self.builder.config.slavebuilddir),
"slave")
Expand Down

0 comments on commit 78c9e45

Please sign in to comment.