Ticket #138: 0002-Code-cleanup.patch

File 0002-Code-cleanup.patch, 2.2 KB (added by tsuna, 3 years ago)

[PATCH 02/11] Code cleanup.

  • buildbot/slave/bot.py

    From a5676e33c360eda9366a094bfb47c31a196fff10 Mon Sep 17 00:00:00 2001
    From: Benoit Sigoure <tsuna@lrde.epita.fr>
    Date: Wed, 7 Nov 2007 20:28:01 +0100
    Subject: [PATCH 02/11] Code cleanup.
    
    	* buildbot/slave/bot.py: Remove trailing whitespaces.
    	* buildbot/status/web/builder.py (StatusResourceBuilder.force):
    	Simplify a couple of `if'.
    
    Signed-off-by: Benoit Sigoure <tsuna@lrde.epita.fr>
    ---
     buildbot/slave/bot.py          |    8 ++++----
     buildbot/status/web/builder.py |    4 ++--
     2 files changed, 6 insertions(+), 6 deletions(-)
    
    diff --git a/buildbot/slave/bot.py b/buildbot/slave/bot.py
    index f64a88d..8a3519f 100644
    a b  
    3737    """ 
    3838    def __init__(self, builder): 
    3939        self.builder = builder 
    40      
     40 
    4141class SlaveBuilder(pb.Referenceable, service.Service): 
    4242 
    4343    """This is the local representation of a single Builder: it handles a 
     
    134134        self.remoteStep = None 
    135135        if self.stopCommandOnShutdown: 
    136136            self.stopCommand() 
    137          
     137 
    138138    # the following are Commands that can be invoked by the master-side 
    139139    # Builder 
    140140    def remote_startBuild(self): 
     
    257257    def remote_shutdown(self): 
    258258        print "slave shutting down on command from master" 
    259259        reactor.stop() 
    260          
    261          
     260 
     261 
    262262class Bot(pb.Referenceable, service.MultiService): 
    263263    """I represent the slave-side bot.""" 
    264264    usePTY = None 
  • buildbot/status/web/builder.py

    diff --git a/buildbot/status/web/builder.py b/buildbot/status/web/builder.py
    index a9af804..e56d1fd 100644
    a b  
    152152        if not re.match(r'^[\w\.\-\/]*$', revision): 
    153153            log.msg("bad revision '%s'" % revision) 
    154154            return Redirect("..") 
    155         if branch == "": 
     155        if not branch: 
    156156            branch = None 
    157         if revision == "": 
     157        if not revision: 
    158158            revision = None 
    159159 
    160160        # TODO: if we can authenticate that a particular User pushed the