Browse Source

clean_logs: add assert

x 3 năm trước cách đây
mục cha
commit
0656bf2ed2
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      script/clean_logs.py

+ 2 - 0
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}"