mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:25:53 +01:00
[PR #1071] [MERGED] hashdict: report unreadable --extra files cleanly (HASHDICT-EXTRA-READ-ERROR) #1105
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1105
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1071
Author: @j-weiner
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @QemmHD
Base:
main← Head:fix/hashdict-extra-read-error📝 Commits (1)
4c1eae0fix: report unreadable hashdict extra inputs (HASHDICT-EXTRA-READ-ERROR)📊 Changes
2 files changed (+31 additions, -2 deletions)
View changed files
📝
tests/test_hashdict.py(+25 -0)📝
tools/hashdict.py(+6 -2)📄 Description
Claimed in the coordination issue as: HASHDICT-EXTRA-READ-ERROR (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7139578822)
What and why
When
hashdict.pyreads a regular file supplied through--extra, anOSErrorfrom opening or reading it escaped as a traceback. The tool already reports unreadable extra directories cleanly. This catches the file case, prints oneERRORline, exits 2, and leaves an existing--outunchanged. The regression uses a syntheticPermissionError; no game files are needed.Tested
python -I -B tests/test_hashdict.py— 42 passed, 1 skipped.python -I -B tests/test_tool_startup.py— 2 passed.python -I -B tests/test_text_write_line_endings.py— 3 passed.python -m compileall -q tools/hashdict.py tests/test_hashdict.py— passed.python -I scripts/check_no_game_data.py tools/hashdict.py tests/test_hashdict.py— passed.python -I tools/hashdict.py --help— passed.git diff --check— passed.PermissionErrorbefore the fix; it now verifies the one-line diagnostic, exit code 2, and preserved output.GPUs tested: n/a (CPU-only synthetic tests).
AI-assisted: yes.
Checklist
mainand merges cleanly.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.