# HG changeset patch # User cmlenz # Date 1190194520 0 # Node ID 6537f01b47308dca0bd38c7f4e3a35c274e508e3 # Parent c9ac97df8a5e286fed45754391d8c8d239e69c6c Clarify `last_step` logic in master. diff --git a/bitten/master.py b/bitten/master.py --- 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)