https://github.com/python/cpython/commit/0f83b8f30620d37eed4748e2b2b77cb1dc73c421 commit: 0f83b8f30620d37eed4748e2b2b77cb1dc73c421 branch: 3.12 author: Miss Islington (bot) <[email protected]> committer: hugovk <[email protected]> date: 2024-07-27T14:27:34Z summary:
[3.12] gh-122044: Don't error during gitignore filtering with no files (GH-122045) (#122354) Co-authored-by: Seth Michael Larson <[email protected]> files: M Tools/build/generate_sbom.py diff --git a/Tools/build/generate_sbom.py b/Tools/build/generate_sbom.py index c08568f2e00326..1b000c3b16a17a 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( _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: [email protected]
