From 5bbfb06ce1e1c3e90be502e9f81c7e95a6e070af Mon Sep 17 00:00:00 2001 From: Xavier-Do Date: Thu, 25 Jul 2019 13:37:50 +0200 Subject: [PATCH] [IMP] runbot: keep result on kill if result is failure When a build is killed, result will be set to manually killed, removing the 'error' or 'warn' result. This commit removes this behaviour in order to keep error result in this case. --- runbot/models/build.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/runbot/models/build.py b/runbot/models/build.py index 8ebb2a77..9b8a4ca1 100644 --- a/runbot/models/build.py +++ b/runbot/models/build.py @@ -535,7 +535,10 @@ class runbot_build(models.Model): self.env.cr.commit() # commit between each build to minimise transactionnal errors due to state computations self.invalidate_cache() if build.requested_action == 'deathrow': - build._kill(result='manually_killed') + result = None + if build.local_state != 'running' and build.global_result not in ('warn', 'ko'): + result = 'manually_killed' + build._kill(result=result) continue if build.requested_action == 'wake_up':