fix(tools): make changelog.py ignore dirs
What changed, and why it matters
This is a minor developer tooling fix. The changelog-checking script previously crashed if someone accidentally created a subdirectory inside a hidden changelog folder. The patch simply skips directories and only looks at files. It has no security relevance for users of the Trezor device or wallet software.
No security action needed. Treat as routine tooling maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change modifies tools/changelog.py’s _iter_fragments() generator to filter .changelog.d entries with f.is_file() before processing. Previously, iterdir() would yield directories and downstream code would treat them as fragment files, causing changelog_check to fail. This is a robustness fix in a CI/development helper script with no product-facing or cryptographic impact.
Changed components
tools/changelog.pyInspect captured patch +2 / −1
### tools/changelog.py
@@ -190,7 +190,8 @@ def filter_line(line: str) -> str | None:
def _iter_fragments(project: Path) -> Iterator[Path]:
fragments_dir = project / ".changelog.d"
- for fragment in fragments_dir.iterdir():
+ files = (f for f in fragments_dir.iterdir() if f.is_file())
+ for fragment in files:
if fragment.name in IGNORED_FILES:
continue
yield fragmentWhy this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.