mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:05:53 +01:00
[PR #274] [CLOSED] bvh_groups: use shared same_report_path and catch --json write OSError #325
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#325
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/274
Author: @Andretuta
Created: 11/24/2026
Status: ❌ Closed
Base:
main← Head:old-pr/10006📝 Commits (1)
0dc1645bvh_groups: use shared same_report_path and catch --json write OSError📊 Changes
2 files changed (+37 additions, -2 deletions)
View changed files
📝
tests/test_bvh_groups.py(+30 -0)📝
tools/bvh_groups.py(+7 -2)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):Claimed in the coordination issue as: https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7116977803
What and why
tools/bvh_groups.pychecked--jsonagainst the input archive with a privateos.path.exists(...) and os.path.samefile(...)check instead oftools/report_paths.same_report_path(CONTRIBUTING.md), and calledwrite_json_report()inmain()without catchingOSError(so passing a directory or unwritable path to--jsonraised an uncaughtPermissionError/IsADirectoryError/FileNotFoundErrortraceback with exit code 1 instead of printing onebvh_groups:error line tostderrand returning exit code 2).report_paths.same_report_path(a.json, a.archive)to guard the archive input.OSErroraroundwrite_json_report()inmain(), printbvh_groups: <error>tostderr, and return2.tests/test_bvh_groups.pycoveringsame_report_pathdelegation and--jsonwriteOSErrorhandling.Tested
python -I tests/test_bvh_groups.py -v: 16/16 passed (OK)python -I tests/test_report_paths.py: 22 tests (21passed,1skipped:OK (skipped=1))python -m compileall -q tools/bvh_groups.py tests/test_bvh_groups.py: exit 0python -I scripts/check_no_game_data.py tools/bvh_groups.py tests/test_bvh_groups.py: exit 0AI-assisted: yes
Checklist
docs/design.md, with how it was confirmed.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.