[PR #1142] anim_skel_match: report JSON write errors (ANIM-SKEL-REPORT-ERROR) #1177

Open
opened 2026-11-26 20:20:21 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1142
Author: @Taffyyy-ops
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: fix/anim-skel-report-error


📝 Commits (1)

  • d9f9471 anim_skel_match: report JSON write errors (ANIM-SKEL-REPORT-ERROR)

📊 Changes

2 files changed (+62 additions, -2 deletions)

View changed files

➕ tests/test_anim_skel_report_error.py (+56 -0)
📝 tools/anim_skel_match.py (+6 -2)

📄 Description

Item ID: ANIM-SKEL-REPORT-ERROR

Handles filesystem/I/O failures cleanly when writing the --json report in tools/anim_skel_match.py:main().

Changes

  • tools/anim_skel_match.py (main): Wraps writing the --json output file in try ... except OSError, printing a clear diagnostic to stderr (anim_skel_match: cannot write <path>: <err>) and returning exit code 2 instead of an unhandled traceback.
  • tests/test_anim_skel_report_error.py: Adds synthetic tests verifying clean stderr diagnostics and exit code 2 on failed JSON writes, plus normal exit 0 on valid writes.

Verification

  • AI-assisted; synthetic tests only, no game data (python -I scripts/check_no_game_data.py).

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1142 **Author:** [@Taffyyy-ops](https://github.com/Taffyyy-ops) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/anim-skel-report-error` --- ### 📝 Commits (1) - [`d9f9471`](https://github.com/ubiquitarianism/leonida/commit/d9f9471b81af7384df9b696841f0d54cb9cd16e8) anim_skel_match: report JSON write errors (ANIM-SKEL-REPORT-ERROR) ### 📊 Changes **2 files changed** (+62 additions, -2 deletions) <details> <summary>View changed files</summary> ➕ `tests/test_anim_skel_report_error.py` (+56 -0) 📝 `tools/anim_skel_match.py` (+6 -2) </details> ### 📄 Description Item ID: `ANIM-SKEL-REPORT-ERROR` Handles filesystem/I/O failures cleanly when writing the `--json` report in `tools/anim_skel_match.py:main()`. ### Changes - **`tools/anim_skel_match.py` (`main`):** Wraps writing the `--json` output file in `try ... except OSError`, printing a clear diagnostic to `stderr` (`anim_skel_match: cannot write <path>: <err>`) and returning exit code `2` instead of an unhandled traceback. - **`tests/test_anim_skel_report_error.py`:** Adds synthetic tests verifying clean `stderr` diagnostics and exit code `2` on failed JSON writes, plus normal exit `0` on valid writes. ### Verification - AI-assisted; synthetic tests only, no game data (`python -I scripts/check_no_game_data.py`). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1177
No description provided.