8000 gh-130052: Fix some exceptions on error paths in _testexternalinspection by sergey-miryanov · Pull Request #130053 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content
8000

gh-130052: Fix some exceptions on error paths in _testexternalinspection #130053

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Prev Previous commit
Next Next commit
Remove redundant check of pid_to_task result
  • Loading branch information
sergey-miryanov committed Feb 17, 2025
commit e9ac75bc5040b71da5bfb522ed6e0ece1dd101e7
3 changes: 0 additions & 3 deletions Modules/_testexternalinspection.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,6 @@ search_map_for_section(pid_t pid, const char* secname, const char* substr) {

mach_port_t proc_ref = pid_to_task(pid);
if (proc_ref == 0) {
if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_PermissionError, "Cannot get task for PID");
}
return 0;
}

Expand Down
0