phase1: make slave port configurable
[buildbot.git] / phase1 / master.cfg
index 7e74bd39f7a0c438ff1d8b5bed547e67a1d99065..1e8e54e0ac4a5041ff9de1083c4c462e5a757db5 100644 (file)
@@ -25,6 +25,11 @@ c = BuildmasterConfig = {}
 # slave name and password must be configured on the slave.
 from buildbot.buildslave import BuildSlave
 
+slave_port = 9989
+
+if ini.has_option("general", "port"):
+       slave_port = ini.getint("general", "port")
+
 c['slaves'] = []
 
 for section in ini.sections():
@@ -40,7 +45,7 @@ for section in ini.sections():
 # 'slavePortnum' defines the TCP port to listen on for connections from slaves.
 # This must match the value configured into the buildslaves (with their
 # --master option)
-c['slavePortnum'] = 9989
+c['slavePortnum'] = slave_port
 
 # coalesce builds
 c['mergeRequests'] = True