[Buildbot-devel] [PATCH 08/11] Don't allow builder names to start with an underscore.

Benoit Sigoure tsuna at lrde.epita.fr
Fri Nov 16 17:12:58 UTC 2007


	Builder names starting with an underscore are reserved for buildbot
	internals from now on.
	* buildbot/master.py (BuildMaster.loadConfig): Raise an error if
	this happens.
	* NEWS: Mention the change.

Signed-off-by: Benoit Sigoure <tsuna at lrde.epita.fr>
---
 NEWS               |    6 ++++++
 buildbot/master.py |    9 ++++++++-
 2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/NEWS b/NEWS
index 1630c30..fcbe502 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,11 @@
 User visible changes in Buildbot.             -*- outline -*-
 
+* Release 0.7.7 (?? ??? 20??)
+
+** Things You Need To Know
+
+*** builder names must not start with an underscore (`_').
+
 * Release 0.7.6 (30 Sep 2007)
 
 ** Things You Need To Know
diff --git a/buildbot/master.py b/buildbot/master.py
index 0cbc344..8a8ecc4 100644
--- a/buildbot/master.py
+++ b/buildbot/master.py
@@ -29,7 +29,7 @@ from buildbot.buildslave import BuildSlave
 from buildbot import interfaces
 
 ########################################
-    
+
 class BotMaster(service.MultiService):
 
     """This is the master-side service which manages remote buildbot slaves.
@@ -503,6 +503,13 @@ class BuildMaster(service.MultiService, styles.Versioned):
             # required
             schedulers = config['schedulers']
             builders = config['builders']
+            for k in builders:
+                if k['name'][0:1] == '_':
+                    errmsg = ("builder names must not start with an "
+                              "underscore: " + k['name'])
+                    log.err(errmsg)
+                    raise ValueError(errmsg)
+
             slavePortnum = config['slavePortnum']
             #slaves = config['slaves']
             #change_source = config['change_source']
-- 
1.5.3.5.654.gdd5ec





More information about the devel mailing list