[PR #128] tools: print the plain path, not a repr'd one, in OSError messages #180

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/128
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: old-pr/9861


📝 Commits (1)

  • 82bdc54 tools: print the plain path, not a repr'd one, in OSError messages

📊 Changes

3 files changed (+12 additions, -3 deletions)

View changed files

📝 tools/bink_names.py (+4 -1)
📝 tools/opus_tags.py (+1 -1)
📝 tools/world_names.py (+7 -1)

📄 Description

Carried over from old PR 9861 by milas6669 in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9861, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
milas6669: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

Resubmission of #5760 (closed during repo transfer/purge at 22:47 UTC). Mergeable with current main with zero conflicts.

Claim: https://github.com/ItsNotRexed/Leonida/issues/5581#issuecomment-7100263084

What and why

Tests failed on Windows because the tools put a repr'd path in their error text. str(OSError) reprs the filename it carries, so every separator doubles on Windows (C:\\Users\\...); on POSIX there is nothing to escape, which is why the tests were green where they were written.

The messages now follow the idiom other tools use ({e.filename or <fallback>}: {e.strerror or e}), printing the path as written.

Tests run

python -I tests/test_bink_names.py     -> OK
python -I tests/test_opus_tags.py      -> OK
python -I tests/test_world_names.py    -> OK

Independently tested and verified on #5760 by @Atomic258, @YordiLorenzo, @LuanBogoqb, @cipher-droid.

No GPU used, no game data. AI-assisted.


🔄 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/128 **Author:** [@Andretuta](https://github.com/Andretuta) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `old-pr/9861` --- ### 📝 Commits (1) - [`82bdc54`](https://github.com/ubiquitarianism/leonida/commit/82bdc54ffea152d60f3290ba6a3119bd54661ec2) tools: print the plain path, not a repr'd one, in OSError messages ### 📊 Changes **3 files changed** (+12 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `tools/bink_names.py` (+4 -1) 📝 `tools/opus_tags.py` (+1 -1) 📝 `tools/world_names.py` (+7 -1) </details> ### 📄 Description > Carried over from **old PR 9861** by `milas6669` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9861`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `milas6669`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): Resubmission of `#5760` (closed during repo transfer/purge at 22:47 UTC). Mergeable with current main with zero conflicts. Claim: https://github.com/ItsNotRexed/Leonida/issues/5581#issuecomment-7100263084 ## What and why Tests failed on Windows because the tools put a repr'd path in their error text. `str(OSError)` reprs the filename it carries, so every separator doubles on Windows (`C:\\Users\\...`); on POSIX there is nothing to escape, which is why the tests were green where they were written. The messages now follow the idiom other tools use (`{e.filename or <fallback>}: {e.strerror or e}`), printing the path as written. ## Tests run ``` python -I tests/test_bink_names.py -> OK python -I tests/test_opus_tags.py -> OK python -I tests/test_world_names.py -> OK ``` Independently tested and verified on `#5760` by `@Atomic258`, `@YordiLorenzo`, `@LuanBogoqb`, `@cipher-droid`. No GPU used, no game data. AI-assisted. --- <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#180
No description provided.