[pypy-svn] buildbot commit 7b0fa3515f0d: make the default slave to automatically find its password from the slaveinfo.py which should be inside master/. Very useful when hacking at bot2
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Thu Nov 4 16:06:25 CET 2010
# HG changeset patch -- Bitbucket.org
# Project buildbot
# URL http://bitbucket.org/pypy/buildbot/overview
# User Antonio Cuni <anto.cuni at gmail.com>
# Date 1288882810 -3600
# Node ID 7b0fa3515f0dda4c5b2b0005672db4c49e1f4311
# Parent 0b7c56df6c16c9efc031800c378e691ba93994e6
make the default slave to automatically find its password from the slaveinfo.py which should be inside master/. Very useful when hacking at bot2
--- a/slave/buildbot.tac
+++ b/slave/buildbot.tac
@@ -11,10 +11,23 @@ basedir = os.path.abspath(os.path.dirnam
#
# ---------------------------------------------------------------
+def find_passwd(slavename):
+ masterdir = os.path.join(basedir, '..', 'master')
+ slaveinfo = os.path.join(masterdir, 'slaveinfo.py')
+ d = {}
+ try:
+ execfile(slaveinfo, d)
+ return d['passwords'][slavename]
+ except Exception, e:
+ print 'error when executing ../master/slaveinfo.py: %s' % repr(e)
+ print 'using default password for the slave'
+ return 'default_password'
+
+
buildmaster_host = 'localhost'
port = 10407
slavename = 'localhost'
-passwd = 'please_change_me'
+passwd = find_passwd(slavename)
keepalive = 600
usepty = 0
umask = None
More information about the Pypy-commit
mailing list