Skip to content

Commit 8c4bff8

Browse files
test: guard against empty path (ietf-tools#9282)
1 parent 827f4e7 commit 8c4bff8

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

ietf/utils/test_runner.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,11 @@ def get_template_paths(apps=None) -> list[str]:
432432
relative_path = pathlib.Path(
433433
dirpath.removeprefix(templatepath).lstrip("/")
434434
)
435-
if apps and relative_path.parts[0] not in apps:
435+
if (
436+
apps
437+
and len(relative_path.parts) > 0
438+
and relative_path.parts[0] not in apps
439+
):
436440
continue # skip uninteresting apps
437441
for filename in files:
438442
file_path = project_path / filename

0 commit comments

Comments
 (0)