From 3b5e90b49eb7cee6494ae220435f8f8045e056e9 Mon Sep 17 00:00:00 2001 From: James Tanner Date: Wed, 28 Feb 2024 22:12:46 -0500 Subject: [PATCH] Fix tdd script indexerror. No-Issue Signed-off-by: James Tanner --- dev/common/tdd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/common/tdd.py b/dev/common/tdd.py index 89b6baa778..3c27ecfaaf 100644 --- a/dev/common/tdd.py +++ b/dev/common/tdd.py @@ -31,7 +31,7 @@ def get_changed_files(pr_branch, target_branch="master"): raw = f.read() filenames = raw.split('\n') filenames = [x for x in filenames if x.startswith('---') or x.startswith('+++')] - filenames = [x.split(None, 1)[1] for x in filenames] + filenames = [x.split(None, 1)[1] for x in filenames if len(x.split(None, 1)) > 1] filenames = [x for x in filenames if not x.startswith('/dev/null')] filenames = [x.lstrip('a/') for x in filenames] filenames = [x.lstrip('b/') for x in filenames]