Mercurial > bitten > bitten-test
changeset 459:6537f01b4730
Clarify `last_step` logic in master.
author | cmlenz |
---|---|
date | Wed, 19 Sep 2007 09:35:20 +0000 |
parents | c9ac97df8a5e |
children | 32b61f031df0 |
files | bitten/master.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/bitten/master.py +++ b/bitten/master.py @@ -210,6 +210,8 @@ if elem.attr['status'] == 'failure': self.log.warning('Build %s step %s failed', build.id, stepname) step.status = BuildStep.FAILURE + if current_step.onerror == 'fail': + last_step = True else: step.status = BuildStep.SUCCESS step.errors += [error.gettext() for error in elem.children('error')] @@ -240,8 +242,7 @@ # If this was the last step in the recipe we mark the build as # completed - if last_step or step.status == BuildStep.FAILURE and \ - current_step.onerror == 'fail': + if last_step: self.log.info('Slave %s completed build %d ("%s" as of [%s])', build.slave, build.id, build.config, build.rev) build.stopped = step.stopped @@ -262,8 +263,7 @@ db.commit() - if last_step or step.status == BuildStep.FAILURE and \ - current_step.onerror == 'fail': + if last_step: for listener in BuildSystem(self.env).listeners: listener.build_completed(build)