diff --git a/scripts/autobump-sweep.py b/scripts/autobump-sweep.py index 7e53449d91..d5361ba1f8 100755 --- a/scripts/autobump-sweep.py +++ b/scripts/autobump-sweep.py @@ -429,7 +429,8 @@ def parse_verdict(verdict_json): def last_clear_reason(text): clear_reasons = [] for line in text.split("\n"): - match = re.search(r".*not mechanically safe \(([^)]+)\).*", line) + # a reason can carry its own parentheses; the engine ends it with "); evidence: " + match = re.search(r"not mechanically safe \((.+)\); evidence: ", line) if match: clear_reasons.append(match.group(1)) return clear_reasons[-1] if clear_reasons else ""