ExecContext: Map ENOTDIR to FileNotFoundError #133

Merged
Jan Lindemann merged 1 commit from jan/fix/20261003-execcontext-map-enotdir-to-filenotfounderror into master 2026-10-03 10:13:15 +02:00 AGit
Owner

ExecContext: Map ENOTDIR to FileNotFoundError

_raise_stat_error() maps the message of a failed remote stat to an exception. A stat below a file answers not a directory, which falls through to the generic EIO: the path is simply absent, and callers see a re-raised error instead of the FileNotFoundError the no such file branch already gives. Map it to FileNotFoundError, so existence checks see absence.

#### ExecContext: Map ENOTDIR to FileNotFoundError `_raise_stat_error()` maps the message of a failed remote stat to an exception. A stat below a file answers `not a directory`, which falls through to the generic EIO: the path is simply absent, and callers see a re-raised error instead of the FileNotFoundError the `no such file` branch already gives. Map it to FileNotFoundError, so existence checks see absence.
ExecContext: Map ENOTDIR to FileNotFoundError
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m15s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m53s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m23s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m40s
CI / Packaging test (push) Successful in 0s
ec89205cbb
_raise_stat_error() maps the message of a failed remote stat to an
exception. A stat below a file answers "not a directory", which falls
through to the generic EIO: the path is simply absent, and callers see a
re-raised error instead of the FileNotFoundError the "no such file" branch
already gives. Map it to FileNotFoundError, so existence checks see
absence.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.99.2
Signed-off-by: Jan Lindemann <jan@janware.com>
Jan Lindemann scheduled this pull request to auto merge when all checks succeed 2026-10-03 10:03:03 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
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
janware/jw-pkg!133
No description provided.