From 301133ad945c7aa409942acebc79b7ab65d44610 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Mon, 4 Sep 2023 09:23:36 +0200 Subject: [PATCH] Misc: Fixup for `accept-expected-changes-from-ci.py` Allow empty lines while looking for diff (between `---expected` and `FAILED`). This can happen when there is `Locations outside the test directory` since an empty line is printed after that warning message (this output can be interleaved with the diff due to parallel execution). --- misc/scripts/accept-expected-changes-from-ci.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/scripts/accept-expected-changes-from-ci.py b/misc/scripts/accept-expected-changes-from-ci.py index 47a6bec76ab..1e03b426e7b 100755 --- a/misc/scripts/accept-expected-changes-from-ci.py +++ b/misc/scripts/accept-expected-changes-from-ci.py @@ -114,7 +114,7 @@ def make_patches_from_log_file(log_file_lines) -> List[Patch]: while True: next_line = parse_log_line(next(lines)) # it can be the case that - if next_line[0] in (" ", "-", "+", "@"): + if next_line and next_line[0] in (" ", "-", "+", "@"): lines_changed.append(next_line) if "FAILED" in next_line: break