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
|
|
| 37 | 37 | """ |
| 38 | 38 | def __init__(self, builder): |
| 39 | 39 | self.builder = builder |
| 40 | | |
| | 40 | |
| 41 | 41 | class SlaveBuilder(pb.Referenceable, service.Service): |
| 42 | 42 | |
| 43 | 43 | """This is the local representation of a single Builder: it handles a |
| … |
… |
|
| 134 | 134 | self.remoteStep = None |
| 135 | 135 | if self.stopCommandOnShutdown: |
| 136 | 136 | self.stopCommand() |
| 137 | | |
| | 137 | |
| 138 | 138 | # the following are Commands that can be invoked by the master-side |
| 139 | 139 | # Builder |
| 140 | 140 | def remote_startBuild(self): |
| … |
… |
|
| 257 | 257 | def remote_shutdown(self): |
| 258 | 258 | print "slave shutting down on command from master" |
| 259 | 259 | reactor.stop() |
| 260 | | |
| 261 | | |
| | 260 | |
| | 261 | |
| 262 | 262 | class Bot(pb.Referenceable, service.MultiService): |
| 263 | 263 | """I represent the slave-side bot.""" |
| 264 | 264 | usePTY = None |
diff --git a/buildbot/status/web/builder.py b/buildbot/status/web/builder.py
index a9af804..e56d1fd 100644
|
a
|
b
|
|
| 152 | 152 | if not re.match(r'^[\w\.\-\/]*$', revision): |
| 153 | 153 | log.msg("bad revision '%s'" % revision) |
| 154 | 154 | return Redirect("..") |
| 155 | | if branch == "": |
| | 155 | if not branch: |
| 156 | 156 | branch = None |
| 157 | | if revision == "": |
| | 157 | if not revision: |
| 158 | 158 | revision = None |
| 159 | 159 | |
| 160 | 160 | # TODO: if we can authenticate that a particular User pushed the |