[Buildbot-devel] [PATCH 02/11] Code cleanup.

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


	* 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 at 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/buildbot/slave/bot.py
+++ b/buildbot/slave/bot.py
@@ -37,7 +37,7 @@ class SlaveBuild:
     """
     def __init__(self, builder):
         self.builder = builder
-    
+
 class SlaveBuilder(pb.Referenceable, service.Service):
 
     """This is the local representation of a single Builder: it handles a
@@ -134,7 +134,7 @@ class SlaveBuilder(pb.Referenceable, service.Service):
         self.remoteStep = None
         if self.stopCommandOnShutdown:
             self.stopCommand()
-        
+
     # the following are Commands that can be invoked by the master-side
     # Builder
     def remote_startBuild(self):
@@ -257,8 +257,8 @@ class SlaveBuilder(pb.Referenceable, service.Service):
     def remote_shutdown(self):
         print "slave shutting down on command from master"
         reactor.stop()
-        
-        
+
+
 class Bot(pb.Referenceable, service.MultiService):
     """I represent the slave-side bot."""
     usePTY = None
diff --git a/buildbot/status/web/builder.py b/buildbot/status/web/builder.py
index a9af804..e56d1fd 100644
--- a/buildbot/status/web/builder.py
+++ b/buildbot/status/web/builder.py
@@ -152,9 +152,9 @@ class StatusResourceBuilder(HtmlResource, OneLineMixin):
         if not re.match(r'^[\w\.\-\/]*$', revision):
             log.msg("bad revision '%s'" % revision)
             return Redirect("..")
-        if branch == "":
+        if not branch:
             branch = None
-        if revision == "":
+        if not revision:
             revision = None
 
         # TODO: if we can authenticate that a particular User pushed the
-- 
1.5.3.5.654.gdd5ec





More information about the devel mailing list