Ticket #138: 0008-Don-t-allow-builder-names-to-start-with-an-underscor.patch

File 0008-Don-t-allow-builder-names-to-start-with-an-underscor.patch, 2.0 KB (added by tsuna, 4 years ago)

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

  • NEWS

    From 74523911c22f541246ba7b4e61e6acd0ea29da3a Mon Sep 17 00:00:00 2001
    From: Benoit Sigoure <tsuna@lrde.epita.fr>
    Date: Tue, 13 Nov 2007 13:26:03 +0100
    Subject: [PATCH 08/11] Don't allow builder names to start with an underscore.
    
    	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@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 b  
    11User visible changes in Buildbot.             -*- outline -*- 
    22 
     3* Release 0.7.7 (?? ??? 20??) 
     4 
     5** Things You Need To Know 
     6 
     7*** builder names must not start with an underscore (`_'). 
     8 
    39* Release 0.7.6 (30 Sep 2007) 
    410 
    511** Things You Need To Know 
  • buildbot/master.py

    diff --git a/buildbot/master.py b/buildbot/master.py
    index 0cbc344..8a8ecc4 100644
    a b from buildbot.buildslave import BuildSlave 
    2929from buildbot import interfaces 
    3030 
    3131######################################## 
    32      
     32 
    3333class BotMaster(service.MultiService): 
    3434 
    3535    """This is the master-side service which manages remote buildbot slaves. 
    class BuildMaster(service.MultiService, styles.Versioned): 
    503503            # required 
    504504            schedulers = config['schedulers'] 
    505505            builders = config['builders'] 
     506            for k in builders: 
     507                if k['name'][0:1] == '_': 
     508                    errmsg = ("builder names must not start with an " 
     509                              "underscore: " + k['name']) 
     510                    log.err(errmsg) 
     511                    raise ValueError(errmsg) 
     512 
    506513            slavePortnum = config['slavePortnum'] 
    507514            #slaves = config['slaves'] 
    508515            #change_source = config['change_source']