gh-155031: repass permission errors on subprocesses to parent / user - #155032
gh-155031: repass permission errors on subprocesses to parent / user#155032flowln wants to merge 2 commits into
Conversation
| main() | ||
| except PermissionError: | ||
| handle_permission_error() | ||
| sys.exit(1) |
There was a problem hiding this comment.
I do not understand this. sys.exit() is already called within the handler.
There was a problem hiding this comment.
I forgot to commit removing the sys.exit call from there, my bad. Seems less confusing to have all code in the except paths ending with sys.exit than to call it from the helper function
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
@picnixz I've tried implementing a test, though I didn't find a portable way to force a PermissionError on a child process, I though about doing |
These changes enable issues with permissions that happen while using the '--subprocesses' option on the 'run' method to propagate back, giving the user an indication of what went wrong. Previously, it would just silently fail, not giving the user a hint of what happened wrong. The `__main__` code was adjusted to streamline the `sys.exit` calls. Signed-off-by: Sofia Donato Ferreira <flowlnlnln@gmail.com>
Signed-off-by: Sofia Donato Ferreira <flowlnlnln@gmail.com>
7ae23fd to
620339d
Compare
These changes enable issues with permissions that happen while using the
--subprocessesoption on the 'run' method to propagate back, giving the user an indication of what went wrong. Previously, it would just silently fail, not giving the user a hint of what happened wrong.