diff options
author | Seth Michael Larson <seth@python.org> | 2024-07-27 11:10:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-27 11:10:05 (GMT) |
commit | 4e04d1a3d237abd0cba354024556c39519e0d163 (patch) | |
tree | 91f7ce9ca30341e9e03bb6e8dd1a40a3b7a7ac4b /Tools | |
parent | 7a6d4ccf0ec16e09f0d8b21c5a0c591e5e3e45f7 (diff) | |
download | cpython-4e04d1a3d237abd0cba354024556c39519e0d163.zip cpython-4e04d1a3d237abd0cba354024556c39519e0d163.tar.gz cpython-4e04d1a3d237abd0cba354024556c39519e0d163.tar.bz2 |
gh-122044: Don't error during gitignore filtering with no files (#122045)
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/build/generate_sbom.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Tools/build/generate_sbom.py b/Tools/build/generate_sbom.py index c08568f..1b000c3 100644 --- a/Tools/build/generate_sbom.py +++ b/Tools/build/generate_sbom.py @@ -108,6 +108,10 @@ def filter_gitignored_paths(paths: list[str]) -> list[str]: '.gitignore:9:*.a Tools/lib.a' """ + # No paths means no filtering to be done. + if not paths: + return [] + # Filter out files in gitignore. # Non-matching files show up as '::<whitespace><path>' git_check_ignore_proc = subprocess.run( |