From 736e6181105ece648dcc7da2dc9235008a177d34 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 12 Mar 2020 13:45:21 +0100 Subject: [PATCH] [IMP] runbot_merge: non-empty fallback on fast-forward failure Up till now if an FF failed with an exception having neither cause nor context the cancel reason would be an empty string. Fallback on stringifying the exception itself as a last resort. --- runbot_merge/models/pull_requests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runbot_merge/models/pull_requests.py b/runbot_merge/models/pull_requests.py index 1111d2be..ed2dfaad 100644 --- a/runbot_merge/models/pull_requests.py +++ b/runbot_merge/models/pull_requests.py @@ -1687,7 +1687,7 @@ class Stagings(models.Model): ) self.write({ 'state': 'ff_failed', - 'reason': str(e.__cause__ or e.__context__ or '') + 'reason': str(e.__cause__ or e.__context__ or e) }) else: prs = self.mapped('batch_ids.prs')