From 0656bf2ed21a57894e43acd6f8f475b4bbebf6dd Mon Sep 17 00:00:00 2001 From: x Date: Sun, 1 Jan 2023 04:47:37 +0100 Subject: [PATCH] clean_logs: add assert --- script/clean_logs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/script/clean_logs.py b/script/clean_logs.py index e77f60dae..4b775f2e3 100644 --- a/script/clean_logs.py +++ b/script/clean_logs.py @@ -133,6 +133,8 @@ def replace(fname, contents): # Multiline logs # We read the next line and check if there's a target set or not else: + assert re.search(f"{log_level}!\\($", line) + old_text = f"{ln()}: {line}" new_text = f"{ln()}: {line}"